dongzl commented on issue #21437: URL: https://github.com/apache/shardingsphere/issues/21437#issuecomment-1292876148
> > You can refer ShardingSphere 5.2.1 release document——https://mp.weixin.qq.com/s/pv7c9oG6uTAgUzTpkfMhag. > > @strongduanmu > > I have read this article and can basically use it. In the Apache document, I do not know the usage of the ${value} variable. In addition, I need to follow the rules: > > 1. Value is a number > 2. Table must be defined in the rule? > > At present, I only need to define databases but not tables (tables can also be used). There are hundreds of tables that need to be defined? > > ``` > rules: > - !SHARDING > // ** When I do not define tables, it always use the first data source ** > #tables: > # user: > # actualDataNodes: tenant_db_${1..2}.user > defaultDatabaseStrategy: > hint: > shardingAlgorithmName: database_hint_inline > > shardingAlgorithms: > database_hint_inline: > type: HINT_INLINE > props: > algorithm-expression: tenant_db_${value} > ``` Hi @lanrenbulan , `shardingsphere-jdbc` or `shardingsphere-proxy`? -- 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]
