v.21.2New Features
Support Data Distribution with Sharding Keys in Cluster and Remote Table Functions
Support insert into table functioncluster, and for both table functionsremoteandcluster, support distributing data across nodes by specify sharding key. Close #16752. #18264 (flynn).
Why it matters
This feature addresses the limitation of not being able to performINSERT operations directly into cluster table functions and improves data distribution control. By allowing users to specify a sharding key, it ensures that data is distributed efficiently and predictably across nodes in a cluster, enhancing performance and scalability.How to use it
Use theINSERT INTO cluster('cluster_name', 'database', 'table', 'sharding_key') syntax to insert data into a cluster table function. For both remote and cluster table functions, specify the sharding key parameter to control how data is distributed among nodes.