Skip to content

Build and Test

Build

Check out source code from GitHub

git checkout https://github.com/housepower/spark-clickhouse-connector.git

Build w/o test

./gradlew clean build -x test

Go to spark-3.4/clickhouse-spark-runtime/build/libs/ to find the output jar clickhouse-spark-runtime-3.4_2.12-0.8.0-SNAPSHOT.jar.

Test

The project leverage Testcontainers and Docker Compose to do integration tests, you should install Docker and Docker Compose before running test, and check more details on Testcontainers document if you'd like to run test with remote Docker daemon.

Run all test

./gradlew clean test

Run single test

./gradlew test --tests=ConvertDistToLocalWriteSuite

Test against custom ClickHouse image

CLICKHOUSE_IMAGE=custom-org/clickhouse-server:custom-tag ./gradlew test