v.22.5Improvement

Allow cluster macro in s3Cluster table function

Allow cluster macro in s3Cluster table function. #36726 (Vadim Volodin).
Allow usage of cluster macros within the s3Cluster table function in ClickHouse.

Why it matters

This feature enables users to reference cluster macros inside the s3Cluster table function, improving flexibility and reusability of cluster configurations. It simplifies managing clusters for S3 table functions by allowing dynamic cluster resolution through macros.

How to use it

Define the cluster macro as usual in your ClickHouse configuration and then use the macro name as the s3Cluster parameter in the table function. For example:

SELECT * FROM s3Cluster('{cluster_macro}', 'bucket', 'path', 'format')