We can add custom settings to ClickHouse SQL when running an insert.
Example:
INSERT INTO [table] SETTINGS [...]
Currently, there is no way to achieve this with the spark connector.
Maybe spark-clickhouse-connector can read settings starting with spark.clickhouse.write.settings. and apply them when write into clickhouse tables.