Creates a new Iceberg REST Catalog client.
Configuration options for the catalog client
Spec-aligned alias for updateTable.
Creates a new namespace in the catalog.
Optionalmetadata: NamespaceMetadataCreates a namespace if it does not exist.
Optionalmetadata: NamespaceMetadataCreates a new table in the catalog.
Creates a table if it does not exist.
Spec-aligned LoadTableResult wrapper for create. Returns the full server
response (metadata, metadata-location, server config, storage-credentials)
plus the captured ETag. Use this when accessDelegation is set so the
server-vended credentials are reachable.
Drops a namespace from the catalog.
The namespace must be empty (contain no tables) before it can be dropped.
Drops a table from the catalog.
Optionaloptions: DropTableRequestLists all namespaces in the catalog.
Paginated namespace list with optional nextPageToken
const { namespaces } = await catalog.listNamespaces();
// List children under a parent
const { namespaces: children } = await catalog.listNamespaces({
parent: { namespace: ['analytics'] },
});
// Paginate
const page1 = await catalog.listNamespaces({ pageSize: 100 });
const page2 = await catalog.listNamespaces({ pageSize: 100, pageToken: page1.nextPageToken });
Lists tables in a namespace.
Paginated table list with optional nextPageToken
Fetch and cache the server's catalog configuration. Subsequent calls return the same object. Calling this is optional — operations will trigger it lazily on first use.
Caches the in-flight promise (not just the resolved value) so concurrent
first-callers don't all fire their own /v1/config request.
Loads metadata for a table.
Pass ifNoneMatch (a previous ETag) to perform a conditional GET. If the
server returns 304 Not Modified, the method returns null.
Loads metadata for a table.
Pass ifNoneMatch (a previous ETag) to perform a conditional GET. If the
server returns 304 Not Modified, the method returns null.
Spec-aligned LoadTableResult wrapper, including server config,
storage-credentials, and the response ETag. Returns null on 304.
Optionaloptions: LoadTableOptionsChecks if a namespace exists in the catalog.
Register an existing metadata file as a table in the given namespace.
Spec-aligned LoadTableResult wrapper for register.
Rename a table. Servers may or may not support cross-namespace renames.
Set or remove properties on a namespace.
Commit updates to a table using the spec-aligned { requirements, updates } shape.
Client for interacting with an Apache Iceberg REST Catalog.
This class provides methods for managing namespaces and tables in an Iceberg catalog. It handles authentication, request formatting, and error handling automatically.
Example