You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/08/08 05:50:30 UTC
[GitHub] [shardingsphere] dym254661025 commented on issue #19961: The keyGenerateAlgorithm is invalid when the insert statement is executed
dym254661025 commented on issue #19961:
URL: https://github.com/apache/shardingsphere/issues/19961#issuecomment-1207695515
shardingsphere 5.1.1
properties
`spring:
shardingsphere:
enabled: true
props:
sql:
show: true
rules:
sharding:
key-generators:
log-key:
type: AUTOKEY
sharding-algorithms:
history-month:
type: MONTH
props:
strategy: standard
algorithmClassName: com.demo.test.framework.config.sharding.MonthStandardShardingAlgorithm
tables:
test_record:
actual-data-nodes: ds-history.test_record_$->{2022..2030}$->{(1..12).collect(i->i.toString().padLeft(2,'0'))}
table-strategy:
standard:
sharding-column: time
sharding-algorithm-name: history-month
key-generate-strategy:
column: id
key-generator-name: log-key
test_info:
actual-data-nodes: ds-history.test_info_2022$->{(2..12).collect(i->i.toString().padLeft(2,'0'))}
table-strategy:
standard:
sharding-column: time
sharding-algorithm-name: history-month
key-generate-strategy:
column: id
key-generator-name: log-key
datasource:
names: ds-history
ds-history:
type: ${spring.datasource.type}
driver-class-name: ${spring.datasource.driverClassName}
url: ${spring.datasource.druid.history.url}
username: ${spring.datasource.druid.history.username}
password: ${spring.datasource.druid.history.password}`
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org