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.

listCatalogs(options?)

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

Parameters

options.includeTables
boolean
default:"false"
Also walk every catalog and populate catalogs with visible tables.

Return type: ListCatalogsResult

FieldTypeDescription
okbooleanWhether the request succeeded
catalogsCatalogTableRef[]{ catalog, namespace, table } triples; populated only with includeTables
registeredCatalogsRegisteredCatalog[]Registered catalogs with name, type, properties, and optionally id, created_at, updated_at, tableCount

listCatalogNamespaces(catalog?)

List Iceberg namespaces in a catalog.

Return type: ListCatalogNamespacesResult

FieldTypeDescription
okbooleanWhether the request succeeded
catalogstringThe catalog that was listed
namespacesstring[]Namespace names

listCatalogTables(options?)

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

options.catalog
string
default:"oleander"
Catalog to list tables from.
options.namespace
string
Restrict listing to one namespace. Omit to list across all namespaces.

Return type: ListCatalogTablesResult

FieldTypeDescription
okbooleanWhether the request succeeded
tablesCatalogTableRef[]{ catalog, namespace, table } triples

getCatalogTableMetadata(options)

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

options.table
string
required
Table name.
options.catalog
string
default:"oleander"
Catalog name.
options.namespace
string
default:"default"
Namespace name.

Return type: CatalogTableMetadataResult

FieldTypeDescription
okbooleanWhether the request succeeded
tableRecord<string, unknown>Raw Iceberg table metadata

getCatalogTableSchema(options)

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 getCatalogTableMetadata() for the full metadata including schema history. Accepts the same options as getCatalogTableMetadata().

Return type: CatalogTableSchemaResult

FieldTypeDescription
catalogstringCatalog name
namespacestringNamespace name
tablestringTable name
schemaIdnullable numberThe resolved schema ID
fieldsIcebergSchemaField[]Fields with id, name, type, required, and optional doc
type is a string for primitive types (for example, "long" or "string") and an object for nested types such as struct, list, and map.

getCatalogTableSize(options)

Compute the size of a table or a partition subset. sizeBytes and recordCount are returned as strings since they can exceed Number.MAX_SAFE_INTEGER.

Parameters

Accepts the same table/catalog/namespace options as getCatalogTableMetadata(), plus:
options.snapshotId
string
Compute the size at a specific snapshot instead of the current one.
options.partitionFilters
{ key, value }[]
default:"[]"
Restrict the size computation to matching partitions.

Return type: CatalogTableSizeResult

FieldTypeDescription
okbooleanWhether the request succeeded
catalogstringCatalog name
namespacestringNamespace name
tablestringTable name
snapshotIdnullable stringSnapshot the size was computed at
sizeBytesstringTotal data size in bytes (stringified bigint)
recordCountstringTotal record count (stringified bigint)
dataFileCountnumberNumber of data files
partitionFilters{ key, value }[]Filters applied, if any