Skip to content

Commit

Permalink
bump clickhouse-server version in docker-compose to 23.9, tweak README
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Dec 4, 2023
1 parent 47005f4 commit ddac2da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,20 @@ This is a command line tool to quickly sync a Substreams with a PostgreSQL datab
```

> **Note** You now have a postgres instance accessible at `postgres://dev-node:insecure-change-me-in-prod@postgres:5432/dev-node?sslmode=disable`
> **Note** You also have a clickhouse instance accessible at `clickhouse://default:default@localhost:9000/default`

1. Run the setup command:

```bash
# that password comes from the default config in `docker-compose.yml`
# the passwords come from the default config in `docker-compose.yml`
export DSN="postgres://dev-node:insecure-change-me-in-prod@localhost:5432/dev-node?sslmode=disable"
substreams-sink-sql setup docs/tutorial/substreams.yaml
#export DSN="clickhouse://default:default@localhost:9000/default"
substreams-sink-sql setup $DSN docs/tutorial/substreams.yaml
```

This will connect to the database and create the schema, using the values from `sink.config.schema` and `sink.config.dsn`
This will connect to the database and create the schema, using the values from `sink.config.schema`

> **Note** For the sake of idempotency, we recommend that the schema file only contain `create table if not exists` statements.
> **Note** For the sake of idempotency, we recommend that the schema file only contain `create (...) if not exists` statements.
1. Run the sink
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
- postgres
database:
container_name: clickhouse-ssp
image: clickhouse/clickhouse-server
image: clickhouse/clickhouse-server:23.9
user: "101:101"
hostname: clickhouse
volumes:
Expand Down

0 comments on commit ddac2da

Please sign in to comment.