qianxuwanyu commented on issue #14177:
URL: 
https://github.com/apache/shardingsphere/issues/14177#issuecomment-999315039


   ```
   # 对外数据库名称
   schemaName: fintax_tax_proxy
   # 数据库链接公共参数
   dataSourceCommon:
    username: root
    password: root123456
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 50
    minPoolSize: 1
    maintenanceIntervalMilliseconds: 30000
   # 数据库地址,这里配置了两个库
   dataSources:
    ds_0:
      url: 
jdbc:mysql://localhost:5688/fintax_tax_0?serverTimezone=UTC&useSSL=false
    ds_1:
      url: 
jdbc:mysql://localhost:5688/fintax_tax_1?serverTimezone=UTC&useSSL=false
   # 分片规则
   rules:
   - !SHARDING
    tables:
      # 虚拟表名称,最后登陆 proxy之后,sharding_db库下只有一张表 test(我这里只分了一个表,用于测试)
      data_qy:
        # ds_${0..1} 分库规则,库索引从0到1,一共两个,前缀为:ds_, test,分成3张表,索引从0到2,前缀为:test_
        actualDataNodes: ds_${0..1}.data_qy_${0..7}
        databaseStrategy:
          standard:
            shardingColumn: qy_id
            shardingAlgorithmName: database_inline
        tableStrategy:
          standard:
            # 分片键
            shardingColumn: qy_id
            shardingAlgorithmName: test_inline
        keyGenerateStrategy:
          column: id
          keyGeneratorName: snowflake  #主键生成策略 -- 雪花算法
      data_tax_report:
        # ds_${0..1} 分库规则,库索引从0到1,一共两个,前缀为:ds_, test,分成3张表,索引从0到2,前缀为:test_
        actualDataNodes: ds_${0..1}.data_tax_report_${0..7}
        databaseStrategy:
          standard:
            shardingColumn: qy_id
            shardingAlgorithmName: user_database_inline
        tableStrategy:
          standard:
            # 分片键
            shardingColumn: qy_id
            shardingAlgorithmName: user_inline
        keyGenerateStrategy:
          column: id
          keyGeneratorName: snowflake  #主键生成策略 -- 雪花算法    
   # 默认数据库分片规则
   


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