xiaoliu10 commented on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-730174580


   this is rules config:
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: zookeeper_${[0,1,2]}.t_order_${[0,1,2]}
         databaseStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: hash_mode
         tableStrategy:
           standard:
             shardingColumn: user_id
             shardingAlgorithmName: hash_mode
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: increment
       t_order_item:
         actualDataNodes: zookeeper_${0..2}.t_order_item_${0..2}
         databaseStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: hash_mode
         tableStrategy:
           standard:
             shardingColumn: user_id
             shardingAlgorithmName: hash_mode
     bindingTables:
       - t_order,t_order_item
     broadcastTables:
       - t_config
     defaultTableStrategy:
       standard:
         shardingColumn: order_id
         shardingAlgorithmName: hash_mode
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: hash_mode
     
     shardingAlgorithms:
       hash_mod:
         type: HASH_MOD
         props:
           sharding-count: '3'
   
     keyGenerators:
       increment:
         type: SNOWFLAKE
         props:
           worker-id: 1


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to