You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "RaigorJiang (via GitHub)" <gi...@apache.org> on 2023/03/12 13:35:22 UTC

[GitHub] [shardingsphere] RaigorJiang commented on issue #24562: how can i refresh the DataNodes when i add a new dataSources

RaigorJiang commented on issue #24562:
URL: https://github.com/apache/shardingsphere/issues/24562#issuecomment-1465201911

   1. JDBC does not provide an API for dynamically modifying rules. Currently, using JDBC + Proxy DistSQL is the only official way. In the future, JDBC may also support DistSQL.
   2. Even if you use DatabaseStrategy only, you need to declare which tables are sharding tables in the sharding rule. The following method is feasible:
   ```yaml
   rules:
   - !SHARDING
      tables: # list sharding tables
        table_a:
          actualDataNodes: xxx
        table_b:
          actualDataNodes: xxx
        table_c:
          actualDataNodes: xxx
      #...
      defaultDatabaseStrategy:
        standard:
          shardingColumn: order_id
          shardingAlgorithmName: database_inline
      defaultTableStrategy:
        none:
      shardingAlgorithms:
        database_inline:
          type: INLINE
          props:
            algorithm-expression: xxx
   ```


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org