jmbkeyes opened a new issue #9420:
URL: https://github.com/apache/shardingsphere/issues/9420
## Question
There's a table, with month(yyyyMM)as sharding key, the springboot config
file as below
`server:
port: 9090
spring:
shardingsphere:
datasource:
names: bocaicheckin${2019..2020}
bocaicheckin2019:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url: jdbc:mysql://10.0.0.5:3306/bocai_checkin2019
username: root
password: jmbkeyes
bocaicheckin2020:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url: jdbc:mysql://10.0.0.5:3306/bocai_checkin2020
username: root
password: jmbkeyes
sharding:
tables:
trainee_checkin_checkout:
actual-data-nodes:
bocaicheckin${2019..2020}.trainee_checkin_checkout_${1..12}
database-strategy:
inline:
sharding-column: month
algorithm-expression: bocaicheckin${(month / 100) as int}
table-strategy:
inline:
sharding-column: month
algorithm-expression: trainee_checkin_checkout_${month % 100}
props:
sql.show: true
`
**For English only**, other languages will not accept.
Before asking a question, make sure you have:
- Googled your question.
- Searched open and closed [GitHub
issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere
Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more
details.
If no response anymore and we cannot reproduce it on current information, we
will **close it**.
----------------------------------------------------------------
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]