Insert into local table SELECT from distributed table in clickhouse caused default.local_table at other node not exists error
I need select data from some distributed and local table, insert into another stand alone local table。I use sql like this: INSERT into local_table SELECT FROM distributed_table WHERE … . The SELECT clause can execute succesfully. But the whole sql executing at local table node cause an error: clickhouse exception code:1002,host=12.27.6.124,port=8123;code=60,Exception:receieved from 12.27.6.123:9000,exception :table default.local_able doesnt exist. The local table is already created on 12.27.6.124.
Sharding function for Distributed VersionedCollapsingMergeTree
The document seems to be silent on sharding function for Distributed VersionedCollapsingMergeTree or CollapsingMergeTree. Shouldn’t the data written to cancel the previous row should go to the same shard for it to work ? I tried a rand function and it did not work. But using a hash function (sipHash64 on the ORDERING keys) worked. This is an important detail but I could never see it mentioned in any article. Would it not be better to document this explicitly ?