diff --git a/examples/docker-compose/README.md b/examples/docker-compose/README.md index 99e47f0..ed5a879 100644 --- a/examples/docker-compose/README.md +++ b/examples/docker-compose/README.md @@ -28,7 +28,41 @@ Solution: Upgrade docker/docker compose to v2. ### Supplemental +#### Setting ClickHouse Server Timezone + +To configure the ClickHouse server timezone: + +1. Edit `config.xml` with your desired timezone: + +```xml + + America/Chicago + +``` + +2. Uncomment the volume mount in `docker-compose.yaml` under the `clickhouse` service: + +```yaml +volumes: + - ./config.xml:/etc/clickhouse-server/conf.d/config.xml +``` + +3. Restart the containers: `docker compose down && docker compose up` + #### Querying data using Spark +To set the session timezone in spark, uncomment and set the value for the variable `spark.sql.session.timeZone` +under the section. +``` +configs: + spark-defaults.conf: + content: | +``` + +``` + # spark.sql.session.timeZone America/Chicago +``` + +This ensures that Spark SQL sessions will use the specified timezone. ```shell docker compose -f docker-compose-spark-iceberg.yaml down -v diff --git a/examples/docker-compose/config.xml b/examples/docker-compose/config.xml new file mode 100644 index 0000000..8bb196c --- /dev/null +++ b/examples/docker-compose/config.xml @@ -0,0 +1,3 @@ + + America/Chicago + diff --git a/examples/docker-compose/docker-compose-spark-iceberg.yaml b/examples/docker-compose/docker-compose-spark-iceberg.yaml index cb30aa0..acf24eb 100644 --- a/examples/docker-compose/docker-compose-spark-iceberg.yaml +++ b/examples/docker-compose/docker-compose-spark-iceberg.yaml @@ -33,4 +33,5 @@ configs: spark.eventLog.dir /home/iceberg/spark-events spark.history.fs.logDirectory /home/iceberg/spark-events spark.sql.catalogImplementation in-memory + # spark.sql.session.timeZone America/Chicago # spark.log.level DEBUG diff --git a/examples/docker-compose/docker-compose.yaml b/examples/docker-compose/docker-compose.yaml index 1a211b2..755c51a 100644 --- a/examples/docker-compose/docker-compose.yaml +++ b/examples/docker-compose/docker-compose.yaml @@ -40,7 +40,7 @@ services: depends_on: - minio-init clickhouse: - image: altinity/clickhouse-server:25.3.3.20186.altinityantalya-alpine + image: altinity/clickhouse-server:25.8.9.20496.altinityantalya-alpine restart: unless-stopped environment: CLICKHOUSE_SKIP_USER_SETUP: "1" # insecure @@ -53,6 +53,7 @@ services: volumes: # for access to clickhouse-logs - ./data/docker-compose/clickhouse/var/log/clickhouse-server:/var/log/clickhouse-server + # - ./config.xml:/etc/clickhouse-server/conf.d/config.xml depends_on: - ice-rest-catalog configs: