housepower / spark-clickhouse-connector

Spark ClickHouse Connector build on DataSourceV2 API
https://housepower.github.io/spark-clickhouse-connector
Apache License 2.0
171 stars 59 forks source link

Support to set ClickHouse query settings when reading table #272

Open zhouyifan279 opened 7 months ago

zhouyifan279 commented 7 months ago

We can add settings to ClickHouse SQL when using ClickHouse client. For example:

SELECT * FROM replacing_merge_tree_table SETTINGS final=1;

Currently, there is not way to achieve this in clickhouse-connector.

Maybe clickhouse-connector can read settings starting with spark.clickhouse.settings. and apply them when read/write clickhouse tables.