sunyijian opened a new issue, #26164:
URL: https://github.com/apache/shardingsphere/issues/26164

   ## Question
   
   application.yml :
   ```
           autoTables:
             t_order:
               actualDataSources: ds$->{1..2}
               sharding-strategy:
                 standard:
                   sharding-column: orderId
                   sharding-algorithm-name: hash-mod-algorithm-4
           sharding-algorithms:
             hash-mod-algorithm-4:
               type: HASH_MOD
               props:
                 sharding-count: 4
   ```
   Tables t_order_0 and t_order_3 in ds1.
   Tables t_order_1 and t_order_2 in ds2.
   About Recommended Scenarios for Using Autotable:  The user only tells the 
shardingSphere the number of shards and does not need to worry about which 
library the actual tables are in or how many tables are in which library.
   I think shardingSphere should be able to automatically identify the 
relationship between these four tables and the data source. Actually, it 
doesn't work.
   console log:
   ```
   ShardingSphere-SQL                       : Actual SQL: ds1 ::: select * from 
t_order_0  order by orderId desc
   ShardingSphere-SQL                       : Actual SQL: ds1 ::: select * from 
t_order_2  order by orderId desc
   ShardingSphere-SQL                       : Actual SQL: ds2 ::: select * from 
t_order_1  order by orderId desc
   ShardingSphere-SQL                       : Actual SQL: ds2 ::: select * from 
t_order_3  order by orderId desc
   
   com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 
'ds1.t_order_2' doesn't exist
   com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 
'ds2.t_order_3' doesn't exist
   ``
   
   The log tells me that Tables t_order_0  and t_order_2  should be in ds1, and 
t_order_1  and t_order_3  should be in ds2. Should I follow this plan to adjust 
my database。
   What should I do to align with the concept of autoTable?


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