Skip to content

Commit

Permalink
docs: Use load_catalog instead (apache#1406)
Browse files Browse the repository at this point in the history
So it is more obvious how to switch catalogs easily.
  • Loading branch information
Fokko authored Dec 11, 2024
1 parent ede363b commit 295ed05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mkdocs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 295ed05

Please sign in to comment.