Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions mkdocs/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading