Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support insert into table function cluster if the cluster does not have sharding key. #16752

Closed
filimonov opened this issue Nov 6, 2020 · 0 comments · Fixed by #18264
Closed
Labels
comp-distributed Distributed tables easy task Good for first contributors feature minor Priority: minor

Comments

@filimonov
Copy link
Contributor

CREATE TABLE default.x AS system.numbers ENGINE = Log;

INSERT INTO FUNCTION cluster('test_cluster_two_shards', default, x) SELECT * FROM numbers(10)

Received exception from server (version 20.11.1):
Code: 55. DB::Exception: Received from localhost:9000. DB::Exception: Method write is not supported by storage Distributed with more than one shard and no sharding key provided. 

0 rows in set. Elapsed: 0.001 sec. 

INSERT INTO FUNCTION cluster('test_cluster_two_shards', default, x, rand()) SELECT * FROM numbers(10)

Received exception from server (version 20.11.1):
Code: 42. DB::Exception: Received from localhost:9000. DB::Exception: Table function 'cluster' requires from 2 to 3 parameters: <addresses pattern or cluster name>, <name of remote database>, <name of remote table>. 

0 rows in set. Elapsed: 0.001 sec. 
@filimonov filimonov added feature easy task Good for first contributors minor Priority: minor comp-distributed Distributed tables labels Nov 6, 2020
@alexey-milovidov alexey-milovidov changed the title Support insert into table function cluster Support insert into table function cluster if the cluster does not have sharding key. Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-distributed Distributed tables easy task Good for first contributors feature minor Priority: minor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant