Skip to main content
Catalog methods let you introspect the Iceberg catalogs registered in oleander. Unless specified otherwise, catalog defaults to the built-in oleander catalog and namespace defaults to default.

list_catalogs(*, include_tables=False)

List the Iceberg catalogs registered in oleander. Pass include_tables=True to also walk every catalog and return the visible catalog/namespace/table triples in catalogs — this is slower; otherwise catalogs is empty.

Parameters

include_tables
bool
default:"False"
Also walk every catalog and populate catalogs with visible tables. Keyword-only.

Return type: ListCatalogsResult

FieldTypeDescription
okboolWhether the request succeeded
catalogslist[CatalogTableRef]catalog/namespace/table triples; populated only with include_tables
registered_catalogslist[RegisteredCatalog]Registered catalogs with name, type, properties, and optionally id, created_at, updated_at, table_count

list_catalog_namespaces(catalog="oleander")

List Iceberg namespaces in a catalog.

Return type: ListCatalogNamespacesResult

FieldTypeDescription
okboolWhether the request succeeded
catalogstrThe catalog that was listed
namespaceslist[str]Namespace names

list_catalog_tables(catalog="oleander", namespace=None)

List Iceberg tables in a catalog. When namespace is omitted, tables are listed across all namespaces in the catalog; namespaces that fail to list are skipped.

Parameters

catalog
str
default:"oleander"
Catalog to list tables from.
namespace
Optional[str]
Restrict listing to one namespace. Omit to list across all namespaces.

Return type: ListCatalogTablesResult

FieldTypeDescription
okboolWhether the request succeeded
tableslist[CatalogTableRef]catalog/namespace/table triples

get_catalog_table_metadata(table, *, catalog="oleander", namespace="default")

Read the Iceberg REST catalog metadata for a single table. The result’s table field is the raw Iceberg metadata: location, schemas, partition-specs, snapshots, properties, and so on.

Parameters

table
str
required
Table name.
catalog
str
default:"oleander"
Catalog name. Keyword-only.
namespace
str
default:"default"
Namespace name. Keyword-only.

Return type: CatalogTableMetadata

FieldTypeDescription
okboolWhether the request succeeded
tabledict[str, Any]Raw Iceberg table metadata

get_catalog_table_schema(table, *, catalog="oleander", namespace="default")

Get the current schema of a table as a flat field list. Resolves current-schema-id against the schemas array of the Iceberg metadata, falling back to the newest schema. Use get_catalog_table_metadata() for the full metadata including schema history. Accepts the same parameters as get_catalog_table_metadata().

Return type: CatalogTableSchema

FieldTypeDescription
catalogstrCatalog name
namespacestrNamespace name
tablestrTable name
schema_idOptional[int]The resolved schema ID
fieldslist[IcebergSchemaField]Fields with id, name, type, required, and optional doc
type is a string for primitive types (for example, "long" or "string") and a dict for nested types such as struct, list, and map.

get_catalog_table_size(table, *, catalog="oleander", namespace="default", snapshot_id=None, partition_filters=None)

Compute the size of a table or a partition subset. size_bytes and record_count are returned as strings since they can exceed 2^53.

Parameters

Accepts the same table/catalog/namespace parameters as get_catalog_table_metadata(), plus:
snapshot_id
Optional[str]
Compute the size at a specific snapshot instead of the current one. Keyword-only.
partition_filters
Optional[list[PartitionFilter | dict]]
Restrict the size computation to matching partitions. Each filter has key and value; plain dicts are accepted. Keyword-only.

Return type: CatalogTableSize

FieldTypeDescription
okboolWhether the request succeeded
catalogstrCatalog name
namespacestrNamespace name
tablestrTable name
snapshot_idOptional[str]Snapshot the size was computed at
size_bytesstrTotal data size in bytes (stringified bigint)
record_countstrTotal record count (stringified bigint)
data_file_countintNumber of data files
partition_filterslist[PartitionFilter]Filters applied, if any