You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by fo...@apache.org on 2023/12/09 20:29:02 UTC
(iceberg-python) branch main updated: Docs: Example of multiple catalogs (#194)
This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-python.git
The following commit(s) were added to refs/heads/main by this push:
new 043aba5 Docs: Example of multiple catalogs (#194)
043aba5 is described below
commit 043aba5e4d12f548acdf08bb911e6ee4e1793ac3
Author: Jayce Slesar <47...@users.noreply.github.com>
AuthorDate: Sat Dec 9 15:28:56 2023 -0500
Docs: Example of multiple catalogs (#194)
* feat(docs): example of multiple catalogs defined in .pyiceberg.yaml
* more explicit example
* lint
---
mkdocs/docs/api.md | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md
index 0e79633..517e52f 100644
--- a/mkdocs/docs/api.md
+++ b/mkdocs/docs/api.md
@@ -33,6 +33,22 @@ catalog:
credential: t-1234:secret
```
+Note that multiple catalogs can be defined in the same `.pyiceberg.yaml`:
+
+```yaml
+catalog:
+ hive:
+ uri: thrift://127.0.0.1:9083
+ s3.endpoint: http://127.0.0.1:9000
+ s3.access-key-id: admin
+ s3.secret-access-key: password
+ rest:
+ uri: https://rest-server:8181/
+ warehouse: my-warehouse
+```
+
+and loaded in python by calling `load_catalog(name="hive")` and `load_catalog(name="rest")`.
+
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).
For more details on possible configurations refer to the [specific page](https://py.iceberg.apache.org/configuration/).