zhaojinchao95 commented on issue #31360:
URL: 
https://github.com/apache/shardingsphere/issues/31360#issuecomment-2131846202

   @bobbyz007 Hello,maybe you should add single configuration. such as:
   
   ```
   databaseName: shadow_db
   
   dataSources:
     ds:
       url: jdbc:mysql://127.0.0.1:3306/ds?useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_shadow:
       url: jdbc:mysql://127.0.0.1:3306/ds_shadow?useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
     - !SINGLE
       tables:
         - "*.*"
     - !SHADOW
       dataSources:
         shadowDataSource:
           productionDataSourceName: ds
           shadowDataSourceName: ds_shadow
       tables:
         t_user:
           dataSourceNames:
             - shadowDataSource
           shadowAlgorithmNames:
             - user_id_insert_match_algorithm
             - user_id_delete_match_algorithm
             - user_id_select_match_algorithm
             - sql_hint_algorithm
       shadowAlgorithms:
         user_id_insert_match_algorithm:
           type: REGEX_MATCH
           props:
             operation: insert
             column: user_type
             regex: "[1]"
         user_id_delete_match_algorithm:
           type: REGEX_MATCH
           props:
             operation: delete
             column: user_type
             regex: "[1]"
         user_id_select_match_algorithm:
           type: REGEX_MATCH
           props:
             operation: select
             column: user_type
             regex: "[1]"
         sql_hint_algorithm:
           type: SQL_HINT
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to