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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]