NoSayDie commented on issue #28901:
URL:
https://github.com/apache/shardingsphere/issues/28901#issuecomment-1786341029
Configuration information:
spring:
shardingsphere:
datasource:
names: master,log
master:
type: com.zaxxer.hikari.HikariDataSource
driverClassName: dm.jdbc.driver.DmDriver
url: jdbc:dm://127.0.0.1:5236/abc5.5.0
username: abc5.5.0
password: abc5.5.0
log:
type: com.zaxxer.hikari.HikariDataSource
driverClassName: dm.jdbc.driver.DmDriver
url: jdbc:dm://127.0.0.1:5236/abc5.5.0
username: abc5.5.0
password: abc5.5.0
sharding:
tables:
t_kims:
actual-data-nodes: master.t_authenticators_$->{0..1} #表分成两个
table-strategy:
inline:
sharding-column: user_name
algorithm-expression:
t_authenticators_${Math.abs(user_name.hashCode()) % 2}
t_fido_log:
actualDataNodes: log.t_fido_log
t_fido_log_extend:
actualDataNodes: log.t_fido_log_extend
t_fido_log_history:
actualDataNodes: log.t_fido_log_history
t_oper_log:
actualDataNodes: log.t_oper_log
t_plugin_data:
actualDataNodes: log.t_plugin_data
default-data-source-name: master #默认数据源
props:
sql:
show: true
--
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]