v.21.1New Features
Add Setting for Insertion into Multi-Sharded Distributed Table Without Key
Add a new setting insert_distributed_one_random_shard = 1 to allow insertion into multi-sharded distributed table without any distributed key. #18294 (Amos Bird).Why it matters
This feature solves the problem of inserting data into multi-sharded Distributed tables that lack a distributed key. Previously, inserts into such tables were not possible or required workarounds. By allowing insertion into a random shard, this setting simplifies data insertion workflows and improves usability for Distributed tables without defined sharding keys.How to use it
Users can enable this feature by settinginsert_distributed_one_random_shard = 1 in their session or server configuration. Once enabled, inserts into Distributed tables without sharding keys will be routed to one random shard automatically.