flyduckforever commented on issue #18759:
URL:
https://github.com/apache/shardingsphere/issues/18759#issuecomment-1172984853
There is a problem with the previous bindtables configuration
Correct configuration:
config-sharding.yml
```
rules:
- !SHARDING
tables:
dp_trade_payment_order:
# 配置数据节点
actualDataNodes:
ds0.dp_trade_payment_order_$->{2020..2025}_0$->{1..4}
# 分表策略
tableStrategy:
complex:
shardingColumns: platform_order_no,order_time,pay_success_time
shardingAlgorithmName: order-algorithm
dp_trade_payment_record:
# 配置数据节点
actualDataNodes:
ds0.dp_trade_payment_record_$->{2020..2025}_0$->{1..4}
# 分表策略
tableStrategy:
complex:
shardingColumns: platform_order_no,pay_success_time
shardingAlgorithmName: order-algorithm
shardingAlgorithms:
order-algorithm:
type: CLASS_BASED
props:
strategy: COMPLEX
algorithmClassName:
com.decard.sharding.config.OrderComplexKeysShardingAlgorithm
bindingTables:
- dp_trade_payment_order
- dp_trade_payment_record
```
--
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]