Skip to content

Commit 043aba5

Browse files
authored
Docs: Example of multiple catalogs (#194)
* feat(docs): example of multiple catalogs defined in .pyiceberg.yaml * more explicit example * lint
1 parent cdce6b0 commit 043aba5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

mkdocs/docs/api.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ catalog:
3333
credential: t-1234:secret
3434
```
3535
36+
Note that multiple catalogs can be defined in the same `.pyiceberg.yaml`:
37+
38+
```yaml
39+
catalog:
40+
hive:
41+
uri: thrift://127.0.0.1:9083
42+
s3.endpoint: http://127.0.0.1:9000
43+
s3.access-key-id: admin
44+
s3.secret-access-key: password
45+
rest:
46+
uri: https://rest-server:8181/
47+
warehouse: my-warehouse
48+
```
49+
50+
and loaded in python by calling `load_catalog(name="hive")` and `load_catalog(name="rest")`.
51+
3652
This information must be placed inside a file called `.pyiceberg.yaml` located either in the `$HOME` or `%USERPROFILE%` directory (depending on whether the operating system is Unix-based or Windows-based, respectively) or in the `$PYICEBERG_HOME` directory (if the corresponding environment variable is set).
3753

3854
For more details on possible configurations refer to the [specific page](https://py.iceberg.apache.org/configuration/).

0 commit comments

Comments
 (0)