From 02bf1b7f434415747bc2cbc7276499a64d542ede Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Thu, 22 Jan 2026 11:19:18 -0800 Subject: [PATCH 1/5] Add missing methods for table and namespace manipulation --- mkdocs/docs/api.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index 1c3273196d..dc27be119d 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -80,6 +80,15 @@ Or, list existing namespaces: ns = catalog.list_namespaces() assert ns == [("docs_example",)] + +# Load namespace properties +properties = catalog.load_namespace_properties("docs_example") + +# Update namespace properties +catalog.update_namespace_properties("docs_example", updates={"owner": "iceberg"}) + +# Drop a namespace +# catalog.drop_namespace("docs_example") ``` ## Create a table @@ -165,6 +174,17 @@ with catalog.create_table_transaction(identifier="docs_example.bids", schema=sch update_spec.add_identity("symbol") txn.set_properties(test_a="test_aa", test_b="test_b", test_c="test_c") + +## Register a table + +To register a table using existing metadata: + +```python +catalog.register_table( + identifier="docs_example.bids", + metadata_location="s3://warehouse/path/to/metadata.json" +) +``` ``` ## Load a table @@ -216,6 +236,31 @@ catalog.table_exists("docs_example.bids") Returns `True` if the table already exists. +## Rename a table + +To rename a table: + +```python +catalog.rename_table( + from_identifier="docs_example.bids", + to_identifier="docs_example.bids_backup" +) +``` + +## Drop a table + +To drop a table: + +```python +catalog.drop_table("docs_example.bids") +``` + +To drop a table and purge all data and metadata files: + +```python +catalog.purge_table("docs_example.bids") +``` + ## Write to a table Reading and writing is being done using [Apache Arrow](https://arrow.apache.org/). Arrow is an in-memory columnar format for fast data interchange and in-memory analytics. Let's consider the following Arrow Table: From 21c212817f2d72b1c6b759c885d5261b99d4eb14 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Mon, 26 Jan 2026 21:11:04 -0800 Subject: [PATCH 2/5] lint fix --- mkdocs/docs/api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index dc27be119d..aef64c6077 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -185,7 +185,8 @@ catalog.register_table( metadata_location="s3://warehouse/path/to/metadata.json" ) ``` -``` + +```python ## Load a table From db88760f0dcc5869f91be9249adc3737a50a6542 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Tue, 27 Jan 2026 10:40:02 -0800 Subject: [PATCH 3/5] Docs fix --- mkdocs/docs/api.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index aef64c6077..6f78323417 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -84,8 +84,8 @@ assert ns == [("docs_example",)] # Load namespace properties properties = catalog.load_namespace_properties("docs_example") -# Update namespace properties -catalog.update_namespace_properties("docs_example", updates={"owner": "iceberg"}) +# Update namespace properties with additions and removals. +catalog.update_namespace_properties("docs_example", removals={"remove-meee!"}, updates={"owner": "iceberg"}) # Drop a namespace # catalog.drop_namespace("docs_example") @@ -186,8 +186,6 @@ catalog.register_table( ) ``` -```python - ## Load a table There are two ways of reading an Iceberg table; through a catalog, and by pointing at the Iceberg metadata directly. Reading through a catalog is preferred, and directly pointing at the metadata is read-only. From ca561f9dca8ee83edd8b83e9cbbea8b926b52785 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Tue, 27 Jan 2026 12:10:45 -0800 Subject: [PATCH 4/5] docs change --- mkdocs/docs/api.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index 6f78323417..34cc2fbd84 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -80,13 +80,22 @@ Or, list existing namespaces: ns = catalog.list_namespaces() assert ns == [("docs_example",)] +``` + +Next, update the namespace properties. + +```python # Load namespace properties properties = catalog.load_namespace_properties("docs_example") # Update namespace properties with additions and removals. catalog.update_namespace_properties("docs_example", removals={"remove-meee!"}, updates={"owner": "iceberg"}) +``` + +Finally, drop the namespace (if you want!) +```python # Drop a namespace # catalog.drop_namespace("docs_example") ``` @@ -174,6 +183,7 @@ with catalog.create_table_transaction(identifier="docs_example.bids", schema=sch update_spec.add_identity("symbol") txn.set_properties(test_a="test_aa", test_b="test_b", test_c="test_c") +``` ## Register a table From 5010729ef062287380da0f0ce9ecf2bb662acea9 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Tue, 27 Jan 2026 15:07:20 -0800 Subject: [PATCH 5/5] remove comment --- mkdocs/docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index 34cc2fbd84..506547fcd6 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -97,7 +97,7 @@ Finally, drop the namespace (if you want!) ```python # Drop a namespace -# catalog.drop_namespace("docs_example") +catalog.drop_namespace("docs_example") ``` ## Create a table