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 2020/08/21 07:03:45 UTC

[GitHub] [shardingsphere] chana71 opened a new issue #6967: about "not support sql contains schema"

chana71 opened a new issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967


   ## Question
   hi,
   Below words are described in the doc:
   > Do not support SQL that contains schema, for the concept of ShardingSphere is to use multiple data source as one data source, so all the SQL visits are based on one logic schema.
   my question is, our application were build above two schema's data in one database. when we transform from mysql to sharding-proxy, we map each schema as one datasource in <proxy>(is this the right way). If we do so, there leave many sql contains schema which will not work with sharding-proxy.
   thx!
   **For English only**, other languages will not accept.
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] chana71 edited a comment on issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
chana71 edited a comment on issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967#issuecomment-680770613


   I have config those two data sources. 
   Sorry, I can't get your idea clearly. I'll just introduce my situation to see if you can help. Thx.
   We create one database for each customer, e.g. cust1, cust2. 
   `show databases` will see these two dbs.
   ```
   cust1
   cust2
   ```
   We used to have SQL like this: `select * from cust1.table`(use cust2's jdbc data source)。We have requirements of querying **across two schemas 's(cust1, cust2) data**. 
   > So, the right way is config that 2 data sources as sharding DB  
   
   As you say, I have created two logic schema.
   1. config-cust1.yml  2. config-cust2.yml. 
   
   Finally, we met the problem-_db1.table not exists_, when executing the above SQL.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] chana71 commented on issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
chana71 commented on issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967#issuecomment-680770613


   I have config those two data sources. 
   Sorry, I can't get your idea clearly. I'll just introduce my situation to see if you can help. Thx.
   We create one database for each customer, e.g. cust1, cust2. 
   `show databases` will see these two dbs.
   ```
   cust1
   cust2
   ```
   We used to have SQL like this: `select * from db1.table`(use db2's jdbc data source)。We have requirements of querying **across two schemas 's(cust1, cust2) data**. 
   > So, the right way is config that 2 data sources as sharding DB  
   
   As I say, I have created two logic schema.
   1. config-cust1.yml  2. config-cust2.yml. 
   
   Finally, we met the problem-_db1.table not exists_, when executing the above SQL.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967#issuecomment-678895430


   > our application were build above two schema's data in one database. when we transform from mysql to sharding-proxy, we map each schema to one datasource in (is this the right way?)
   
   It is not the right way. Please imagine that there is only single database if databases managed by ShardingSphere.
   User do not need to care about schema name.
   So, the right way is config that 2 data sources as sharding db and managed by ShardingSphere's sharding feature.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking closed issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking closed issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] chana71 edited a comment on issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
chana71 edited a comment on issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967#issuecomment-680770613


   I have config those two data sources. 
   Sorry, I can't get your idea clearly. I'll just introduce my situation to see if you can help. Thx.
   We create one database for each customer, e.g. cust1, cust2. 
   `show databases` will see these two dbs.
   ```
   cust1
   cust2
   ```
   We used to have SQL like this: `select * from cust1.table`(use cust2's jdbc data source)。We have requirements of querying **across two schemas 's(cust1, cust2) data**. 
   > So, the right way is config that 2 data sources as sharding DB  
   
   As I say, I have created two logic schema.
   1. config-cust1.yml  2. config-cust2.yml. 
   
   Finally, we met the problem-_db1.table not exists_, when executing the above SQL.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967#issuecomment-696063301


   Two points here:
   1、Actually, we recommend store multiple customers data in a uniformed logic database and use sharding key like `userid%16` to isolate customer's data.
   2、If each customer hold his only database, an independent datasource is suggested for this case. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #6967: about "not support sql contains schema"

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #6967:
URL: https://github.com/apache/shardingsphere/issues/6967#issuecomment-696063301


   Two points here:
   1、Actually, we recommend store multiple customers data in a uniformed logic database and use sharding key like `userid%16` to isolate customer's data.
   2、If each customer hold his only database, an independent datasource is suggested for this case. 


----------------------------------------------------------------
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:
users@infra.apache.org