Skip to content

Commit

Permalink
Catalog: Documentation to create tables SQLCatalog (#106)
Browse files Browse the repository at this point in the history
* Updated api.md

* Updated api.md

* Fix the linter

---------

Co-authored-by: Fokko Driesprong <fokko@apache.org>
  • Loading branch information
mobley-trent and Fokko authored Oct 26, 2023
1 parent d8bc9a9 commit 7ec1c04
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mkdocs/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ catalog = load_catalog(
)
```

If the catalog has not been initialized before, you need to run:

```python
catalog.create_tables()
```

Let's create a namespace:

```python
Expand Down Expand Up @@ -124,6 +130,7 @@ sort_order = SortOrder(SortField(source_id=2, transform=IdentityTransform()))
catalog.create_table(
identifier="docs_example.bids",
schema=schema,
location="s3://pyiceberg",
partition_spec=partition_spec,
sort_order=sort_order,
)
Expand Down

0 comments on commit 7ec1c04

Please sign in to comment.