apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.89k stars 6.73k forks source link

If only some databases are divided into databases and tables, how does shardingSphere 5.0 configure the default data source? #16649

Closed xxmlovezw closed 3 months ago

xxmlovezw commented 2 years ago

According to the Apache ShardingSphere 5.0.0-beta official Chinese documentation official documentation Configure spring.shardingsphere.rules.sharding.default-data-source-name=stash1 in application.yaml As a result, it does not work

strongduanmu commented 2 years ago

@xxmlovezw From 5.x version, users do not need to configure the default dataSource, ShardingSphere will automatically load and manage single tables.

xxmlovezw commented 2 years ago

@strongduanmu If I want to put a table that is not sharded into a specified database, how do I configure it? Now I find that tables that do not shard the tables are randomly assigned to the two databases I configured.

strongduanmu commented 2 years ago

@strongduanmu If I want to put a table that is not sharded into a specified database, how do I configure it? Now I find that tables that do not shard the tables are randomly assigned to the two databases I configured.

@xxmlovezw You can use distsql to set default resource——https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/single-table/.

xxmlovezw commented 2 years ago

@strongduanmu If I only use shardingSphere-jdbc ,Is there a way to implement a table configuration that does not shard into a table to the specified database?

github-actions[bot] commented 2 years ago

Hello , this issue has not received a reply for several days. This issue is supposed to be closed.

Wendymayu commented 1 year ago

@strongduanmu If I only use shardingSphere-jdbc ,Is there a way to implement a table configuration that does not shard into a table to the specified database?

Have you resolved this problem, buddy?

github-actions[bot] commented 6 months ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.