Yes, you’re right. The sharding rule is prerequisite before you execute any
SQL.
-
Juan Pan (Trista)
Apache ShardingSphere
Eric 于2019年9月9日周一 上午5:53写道:
> Hi Juan,
>
> Thank you.
>
> I think that makes sense because rules are need for the routing even though
> the
Hi Juan,
Thank you.
I think that makes sense because rules are need for the routing even though
the table can be created. Which means the rule has to be setup before
creating tables.
Regards,
Eric Poon
Hi, Eric.
DDL SQL will be routed to all the databases configured in setting file,
please notice, not just all the instances.
But the first thing is that you need to create a Sharding rule to tell
ShardingSphere which databases tables are created.
-
Juan Pan (Trista)
Hi,
I tried following statement, it returned an error "Cannot find table rule
and default data source with logic table: 'test1'". I think ShardingSphere
route DDL statement to all database instances by default?
Please help.
create table test1 (
field1 varchar(40));
Best Regards,
Eric Poon