Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit ad95dcb

Browse files
authored
Merge pull request #40 from tablelandnetwork/bcalza/multitable
adds support for streaming multi tables
2 parents 30b6b5e + fdb2c1c commit ad95dcb

File tree

9 files changed

+320
-329
lines changed

9 files changed

+320
-329
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ make install
9494
- Log into the [Supabase](https://supabase.io/) dashboard and go to your project, or create a new one.
9595
- Check if logical replication is enabled. This should be the default setting, so you shouldn't have to change anything. You can do this in the `SQL Editor` section on the left hand side of the Supabase dashboard by running `SHOW wal_level;` query, which should log `logical`.
9696
- You can find the database connection information on the left hand side under `Project Settings` > `Database`. You will need the `Host`, `Port`, `Database`, `Username`, and `Password` to connect to your database.
97-
- When you create a vault, the `--dburi` should follow this format:
98-
```sh
99-
postgresql://postgres:[PASSWORD]@db.[PROJECT_ID].supabase.co:5432/postgres
100-
```
10197

10298
### Create a vault
10399

@@ -114,7 +110,7 @@ A new private key will be written to `FILENAME`.
114110
The name of a vault contains a `namespace` (e.g. `my_company`) and the name of an existing database relation (e.g. `my_table`), separated by a period (`.`). Use `vaults create` to create a new vault. See `vaults create --help` for more info.
115111

116112
```bash
117-
vaults create --dburi [DBURI] --account [WALLET_ADDRESS] namespace.relation_name
113+
vaults create --account [WALLET_ADDRESS] namespace.relation_name
118114
```
119115

120116
🚧 Vaults currently only replicates `INSERT` statements, which means that it only replicates append-only data (e.g., log-style data). Row updates and deletes will be ignored. 🚧
@@ -124,14 +120,18 @@ vaults create --dburi [DBURI] --account [WALLET_ADDRESS] namespace.relation_name
124120
Use `vaults stream` to start a daemon that will continuously push changes to the underlying table/view to the network. See `vaults stream --help` for more info.
125121

126122
```bash
127-
vaults stream --private-key [PRIVATE_KEY] namespace.relation_name
123+
vaults stream --dburi [DB_URI] --tables t1,t2 --private-key [PRIVATE_KEY] namespace.relation_name
128124
```
129125

130-
### Write a Parquet file
126+
The `--dburi` should follow this format:
127+
128+
```sh
129+
postgresql://[USER]:[PASSWORD]@[HOST]:[PORT]/[DATABASE]
130+
```
131131

132-
Before writing a Parquet file, you need to [Create a vault](#create-a-vault), if not already created. You can omit the `--dburi` flag, in this case.
132+
### Write a Parquet file
133133

134-
Then, use `vaults write` to write a Parquet file.
134+
Before writing a Parquet file, you need to [Create a vault](#create-a-vault), if not already created. Then, use `vaults write` to write a Parquet file.
135135

136136
```bash
137137
vaults write --vault [namespace.relation_name] --private-key [PRIVATE_KEY] filepath
@@ -205,7 +205,7 @@ PORT=8888 ./scripts/server.sh
205205
./scripts/run.sh account create pk.out
206206

207207
# Start replicating
208-
./scripts/run.sh vaults stream --private-key [PRIVATE_KEY] namespace.relation_name
208+
./scripts/run.sh vaults stream --dburi [DB_URI] --tables t1,t2 --private-key [PRIVATE_KEY] namespace.relation_name
209209
```
210210

211211
### Run tests

0 commit comments

Comments
 (0)