Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions examples/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<clickhouse replace="true">
<timezone>America/Chicago</timezone>
</clickhouse>
```

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
Expand Down
3 changes: 3 additions & 0 deletions examples/docker-compose/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<clickhouse replace="true">
<timezone>America/Chicago</timezone>
</clickhouse>
1 change: 1 addition & 0 deletions examples/docker-compose/docker-compose-spark-iceberg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the example added here instead of under services.spark-iceberg.configs, which is where the README says to add it? I know both will work but wondering for consistency if they should be in the same place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated README, please check

# spark.log.level DEBUG
3 changes: 2 additions & 1 deletion examples/docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down