menghaoranss commented on issue #13658:
URL: 
https://github.com/apache/shardingsphere/issues/13658#issuecomment-971384304


   Please use `CLASS_BASED` type to configure custom sharding algorithm in 
5.0.0 version:
   ```
   rules:
   - !SHARDING
     tables:
       t_order: 
         actualDataNodes: ds_${0..1}.t_order
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: snowflake
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item
         keyGenerateStrategy:
           column: order_item_id
           keyGeneratorName: snowflake
     bindingTables:
       - t_order,t_order_item
     broadcastTables:
       - t_address
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_classbased
     defaultTableStrategy:
       none:
     
     shardingAlgorithms:
       database_classbased:
         type: CLASS_BASED
         props:
           strategy: standard
           algorithmClassName: 
org.apache.shardingsphere.example.extension.sharding.algortihm.classbased.fixture.ClassBasedStandardShardingAlgorithmFixture
       
   ```


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