yinhongke commented on issue #25693:
URL:
https://github.com/apache/shardingsphere/issues/25693#issuecomment-1549161230
databaseName: test
dataSources:
ds_0:
url:
jdbc:mysql://localhost:3306/test?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !SHARDING
tables:
delivery:
actualDataNodes:
db.delivery,db.delivery_${2023..2024}0${1..9}0${1..9},db.delivery_${2023..2024}${10..12}0${1..9},db.delivery_${2023..2024}0${1..9}${10..31},db.delivery_${2023..2024}${10..12}${10..31}
tableStrategy:
standard:
shardingColumn: create_time
shardingAlgorithmName: delivery-table-inline
receive:
actualDataNodes:
ds_0.receive_20230428,ds_0.receive_20230429,ds_0.receive_20230430,ds_0.receive_20230501,ds_0.receive_20230502,ds_0.receive_20230503,ds_0.receive_20230504,ds_0.receive_202300505,ds_0.receive_20230506,ds_0.receive_20230507
tableStrategy:
standard:
shardingColumn: create_time
shardingAlgorithmName: receive-table-inline
shardingAlgorithms:
delivery-table-inline:
type: INLINE
props:
algorithm-expression:
delivery_$->{create_time.toString().substring(0,10).replace('-','')}
allow-range-query-with-inline-sharding: true
receive-table-inline:
type: INLINE
props:
algorithm-expression:
receive_$->{create_time.toString().substring(0,10).replace('-','')}
allow-range-query-with-inline-sharding: 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]