wang7241 edited a comment on issue #6892:
URL: https://github.com/apache/shardingsphere/issues/6892#issuecomment-675241592


   > 
   > 
   > @wang7241 Please try again according to the configuration below
   > 
   > ```
   > spring:
   >   shardingsphere:
   >     props:
   >       sql.show: true
   >     datasource:
   >       default-data-source-name: ds0
   >       names: ds0
   >       ds0:
   >         type: com.zaxxer.hikari.HikariDataSource
   >         driver-class-name: com.mysql.jdbc.Driver
   >         jdbcUrl: 
jdbc:mysql://127.0.0.1:3306/fiforal_cw?characterEncoding=UTF-8&useUnicode=true&allowMultiQueries=true&&useSSL=true
   >         username: root
   >         password: root
   > ...
   > ```
   
   it is means sharding tables does not work
   
   Is the current configuration like this:
   
   
   ```
   spring:
     shardingsphere:
       props:
         sql.show: true
       datasource:
         default-data-source-name: ds0
         names: ds0
         ds0:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.jdbc.Driver
           jdbcUrl: 
jdbc:mysql://127.0.0.1:3306/fiforal_cw?characterEncoding=UTF-8&useUnicode=true&allowMultiQueries=true&&useSSL=true
           username: root
           password: root
       sharding:
         tables:
           oral_cw_classwork_stu:
             actual-data-nodes: ds0.oral_cw_classwork_stu_${0..9}
             table-strategy:
               inline:
                 sharding-column: school_id
                 algorithm-expression: 
oral_cw_classwork_stu_$->{school_id.toLong()  % 10}
           oral_cw_classwork_stu_content:
             actual-data-nodes: ds0.oral_cw_classwork_stu_content_${0..9}
             table-strategy:
               inline:
                 sharding-column: school_id
                 algorithm-expression: 
oral_cw_classwork_stu_content_$->{school_id.toLong()  % 10}
           oral_cw_multilateral_assessment:
             actual-data-nodes: ds0.oral_cw_multilateral_assessment_${0..9}
             table-strategy:
               inline:
                 sharding-column: school_id
                 algorithm-expression: 
oral_cw_multilateral_assessment_$->{school_id.toLong()  % 10}
           oral_cw_replys:
             actual-data-nodes: ds0.oral_cw_replys_${0..9}
             table-strategy:
               inline:
                 sharding-column: school_id
                 algorithm-expression: oral_cw_replys_$->{school_id.toLong()  % 
10}
           oral_cw_thumbs:
             actual-data-nodes: ds0.oral_cw_thumbs_${0..9}
             table-strategy:
               inline:
                 sharding-column: school_id
                 algorithm-expression: oral_cw_thumbs_$_$->{school_id.toLong()  
% 10}
           oral_cw_comments:
             actual-data-nodes: ds0.oral_cw_comments_${0..9}
             table-strategy:
               inline:
                 sharding-column: school_id
                 algorithm-expression: 
oral_cw_comments_$_$->{school_id.toLong()  % 10}      
         binding-tables: oral_cw_classwork_stu,oral_cw_classwork_stu_content
   ```


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


Reply via email to