enoera00 opened a new issue, #25858:
URL: https://github.com/apache/shardingsphere/issues/25858

   ## Question
   
   My requirement is to only sharding database without sharding table, but I 
found that when I write the configuration, the "tables" node must be configured 
to take effect, which will cause me to configure all the tables, the 
configuration is very large, and when the table changes I have to modify the 
configuration, this increasing the amount of maintenance, and I think this 
configuration is not necessary for my needs. Is there any way to solve it? 
Below is my configuration:
   
   > Also i have read  the official document carefully, it says the "tables" 
configuration is not required, but it cannot take effect without the 
configuration
   
   ```yaml
   mode:
     type: Standalone
     repository:
       type: JDBC
       props:
         path: demo
   
   dataSources:
     ssds_0:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: com.mysql.jdbc.Driver
       jdbcUrl: 
jdbc:mysql://127.0.0.1:3306/ssds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
       username: root
       password: 123456
       maxPoolSize: 10
     ssds_1:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: com.mysql.jdbc.Driver
       jdbcUrl: 
jdbc:mysql://127.0.0.1:3306/ssds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
       username: root
       password: 123456
       maxPoolSize: 10
     ssds_2:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: com.mysql.jdbc.Driver
       jdbcUrl: 
jdbc:mysql://127.0.0.1:3306/ssds_2?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
       username: root
       password: 123456
       maxPoolSize: 10
   
   rules:
   - !SHARDING
     tables: # I don't want to configure this node, and I don't think it's 
necessary
       t_order:
         actualDataNodes: readwrite_ds_${0..1}.t_order
     defaultDatabaseStrategy:
       hint:
         shardingAlgorithmName: org_hint
     shardingAlgorithms:
       org_hint:
         type: HINT_INLINE
         props:
           algorithm-expression: readwrite_ds_${value}
   - !READWRITE_SPLITTING
     dataSources:
       readwrite_ds_0:
         staticStrategy:
           writeDataSourceName: ssds_0
           readDataSourceNames:
             - ssds_1
         loadBalancerName: round_robin
       readwrite_ds_1:
         staticStrategy:
           writeDataSourceName: ssds_2
           readDataSourceNames:
             - ssds_2
         loadBalancerName: round_robin
     loadBalancers:
       round_robin:
         type: ROUND_ROBIN
   
   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]

Reply via email to