Skip to content

Deployment

Jar

Put clickhouse-spark-runtime-3.4_2.12-0.7.3.jar and clickhouse-jdbc-0.4.6-all.jar into $SPARK_HOME/jars/, then you don't need to bundle the jar into your Spark application, and --jar is not required when using spark-shell or spark-sql(again, for SQL-only use cases, Apache Kyuubi is recommended for Production).

Configuration

Persist catalog configurations into $SPARK_HOME/conf/spark-defaults.conf, then --confs are not required when using spark-shell or spark-sql.

spark.sql.catalog.ck_01=xenon.clickhouse.ClickHouseCatalog
spark.sql.catalog.ck_01.host=10.0.0.1
spark.sql.catalog.ck_01.protocol=http
spark.sql.catalog.ck_01.http_port=8123
spark.sql.catalog.ck_01.user=app
spark.sql.catalog.ck_01.password=pwd
spark.sql.catalog.ck_01.database=default

spark.sql.catalog.ck_02=xenon.clickhouse.ClickHouseCatalog
spark.sql.catalog.ck_02.host=10.0.0.2
spark.sql.catalog.ck_02.protocol=http
spark.sql.catalog.ck_02.http_port=8123
spark.sql.catalog.ck_02.user=app
spark.sql.catalog.ck_02.password=pwd
spark.sql.catalog.ck_02.database=default