From 295ed05899c12aaacb3818e22a3b817e39418131 Mon Sep 17 00:00:00 2001 From: Fokko Driesprong Date: Wed, 11 Dec 2024 16:38:31 +0100 Subject: [PATCH] docs: Use `load_catalog` instead (#1406) So it is more obvious how to switch catalogs easily. --- mkdocs/docs/index.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mkdocs/docs/index.md b/mkdocs/docs/index.md index 097813c9ab..bd1b3e072c 100644 --- a/mkdocs/docs/index.md +++ b/mkdocs/docs/index.md @@ -75,18 +75,21 @@ mkdir /tmp/warehouse Open a Python 3 REPL to set up the catalog: ```python -from pyiceberg.catalog.sql import SqlCatalog +from pyiceberg.catalog import load_catalog warehouse_path = "/tmp/warehouse" -catalog = SqlCatalog( +catalog = load_catalog( "default", **{ + 'type': 'sql', "uri": f"sqlite:///{warehouse_path}/pyiceberg_catalog.db", "warehouse": f"file://{warehouse_path}", }, ) ``` +The `sql` catalog works for testing locally without needing another service. If you want to try out another catalog, please [check out the configuration](https://py.iceberg.apache.org/configuration/#catalogs). + ## Write a PyArrow dataframe Let's take the Taxi dataset, and write this to an Iceberg table.