peilinqian commented on issue #21013:
URL: 
https://github.com/apache/shardingsphere/issues/21013#issuecomment-1254665023

   ```
   rules:
   - !SHARDING
     tables:
       lineitem:
         actualDataNodes: ds_${0..1}.lineitem_${0..1}
         databaseStrategy:
           standard:
             shardingColumn: l_partkey
             shardingAlgorithmName: lineitem-database-inline
         tableStrategy:
           standard:
             shardingColumn: l_orderkey
             shardingAlgorithmName: lineitem-table-inline
       customer:
         actualDataNodes: ds_${0..1}.customer_${0..1}
         databaseStrategy:
           standard:
             shardingColumn: c_custkey
             shardingAlgorithmName: customer-database-inline
         tableStrategy:
           standard:
             shardingColumn: c_nationkey
             shardingAlgorithmName: customer-table-inline
       nation:
         actualDataNodes: ds_${0..1}.nation_${0..1}
         databaseStrategy:
           standard:
             shardingColumn: n_nationkey
             shardingAlgorithmName: nation-database-inline
         tableStrategy:
           standard:
             shardingColumn: n_regionkey
             shardingAlgorithmName: nation-table-inline
       orders:
         actualDataNodes: ds_${0..1}.orders_${0..1}
         databaseStrategy:
           standard:
             shardingColumn: o_orderkey
             shardingAlgorithmName: orders-database-inline
         tableStrategy:
           standard:
             shardingColumn: o_custkey
             shardingAlgorithmName: orders-table-inline
       part:
         actualDataNodes: ds_${0..1}.part_${0..1}
         databaseStrategy:
           standard:
             shardingColumn: p_partkey
             shardingAlgorithmName: part-database-inline
         tableStrategy:
           standard:
             shardingColumn: p_size
             shardingAlgorithmName: part-table-inline
       partsupp:
         actualDataNodes: ds_${0..1}.partsupp_${0..1}
         databaseStrategy:
           standard:
             shardingColumn: ps_partkey
             shardingAlgorithmName: partsupp-database-inline
         tableStrategy:
           standard:
             shardingColumn: ps_suppkey
             shardingAlgorithmName: partsupp-table-inline
       region:
         actualDataNodes: ds_${0..1}.region
         databaseStrategy:
           standard:
             shardingColumn: r_regionkey
             shardingAlgorithmName: region-database-inline
       supplier:
         actualDataNodes: ds_${0..1}.supplier_${0..1}
         databaseStrategy:
           standard:
             shardingColumn: s_suppkey
             shardingAlgorithmName: supplier-database-inline
         tableStrategy:
           standard:
             shardingColumn: s_nationkey
             shardingAlgorithmName: supplier-table-inline
     defaultDatabaseStrategy:
       none:
     defaultTableStrategy:
       none:
   
     shardingAlgorithms:
       lineitem-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${l_partkey % 2}
       lineitem-table-inline:
         type: INLINE
         props:
           algorithm-expression: lineitem_${l_orderkey % 2}
       customer-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${c_custkey % 2}
       customer-table-inline:
         type: INLINE
         props:
           algorithm-expression: customer_${c_nationkey % 2}
       nation-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${n_nationkey % 2}
       nation-table-inline:
         type: INLINE
         props:
           algorithm-expression: nation_${n_regionkey % 2}
       orders-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${o_orderkey % 2}
       orders-table-inline:
         type: INLINE
         props:
           algorithm-expression: orders_${o_custkey % 2}
       part-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${p_partkey % 2}
       part-table-inline:
         type: INLINE
         props:
           algorithm-expression: part_${p_size % 2}
       partsupp-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${ps_partkey % 2}
       partsupp-table-inline:
         type: INLINE
         props:
           algorithm-expression: partsupp_${ps_suppkey % 2}
       region-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${r_regionkey % 2}
       supplier-database-inline:
         type: INLINE
         props:
           algorithm-expression: ds_${s_suppkey % 2}
       supplier-table-inline:
         type: INLINE
         props:
           algorithm-expression: supplier_${s_nationkey % 2}
   
   - !READWRITE_SPLITTING
     dataSources:
       ds_0:
         staticStrategy:
           writeDataSourceName: write_0
           readDataSourceNames:
             - read0_0
             - write_0
         loadBalancerName: roundRobin
       ds_1:
         staticStrategy:
           writeDataSourceName: write_1
           readDataSourceNames:
             - read1_0
             - write_1
         loadBalancerName: roundRobin
     loadBalancers:
       roundRobin:
         type: ROUND_ROBIN
   ```


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