Iceberg REST Catalog
The Iceberg REST catalog provider in Sail allows you to connect to an external catalog that exposes the Iceberg REST Catalog API.
Options
An Iceberg REST catalog can be configured using the following options.
type(required): The catalog provider. Set this option toiceberg-rest.name(required): The catalog name.uri(required): The base URI of the Iceberg REST catalog server.warehouse(optional): The catalog warehouse location.prefix(optional): The prefix for catalog API endpoints.namespace_separator(optional): The client-side fallback for the Iceberg RESTnamespace-separatorcatalog property. Use the separator that the REST server expects, such as::or/. Sail also accepts URL-encoded values returned by REST servers, such as%3A%3Afor::. If this option is not set or is empty, Sail uses the Iceberg REST default unit separator.oauth_access_token(optional): The OAuth 2.0 access token.bearer_access_token(optional): The bearer token for authentication. This option takes precedence overoauth_access_token.bearer_access_token_file(optional): The path to a file that holds the bearer token. This option takes precedence overbearer_access_tokenandoauth_access_token. Sail reads the token from this file for every request, so it picks up a rotated token, such as a kubelet-projected service account token, without restarting the server. If a request is rejected with401 Unauthorized, Sail reloads the file and retries the request once. The file must contain the raw token without theBearerprefix for the HTTPAuthorizationheader. Surrounding whitespace in the file is trimmed. Empty or unreadable files produce an error rather than falling back to other options.
See Common Options for caching configuration.
Server Configuration
Sail calls GET /v1/config before catalog operations. The final Iceberg REST catalog configuration is merged in this order:
- Server
defaults. - Sail client configuration.
- Server
overrides.
Server overrides take precedence over matching values configured in Sail. For example, if the REST server returns namespace-separator in overrides, Sail uses that value to encode multipart namespaces even when namespace_separator is configured locally. Configuring namespace_separator in Sail does not configure the REST server. The server must already decode the same separator, usually by advertising it from /v1/config.
Examples
This example configures an Iceberg REST catalog without authentication.
export SAIL_CATALOG__LIST='[{type="iceberg-rest", name="sail", uri="https://catalog.example.com"}]'This example uses an OAuth access token.
export SAIL_CATALOG__LIST='[{type="iceberg-rest", name="sail", uri="https://catalog.example.com", warehouse="s3://data/warehouse", oauth_access_token="..."}]'This example uses a bearer token.
export SAIL_CATALOG__LIST='[{type="iceberg-rest", name="sail", uri="https://catalog.example.com", warehouse="s3://data/warehouse", bearer_access_token="..."}]'This example reads a bearer token from a file, such as a kubelet-projected service account token.
export SAIL_CATALOG__LIST='[{type="iceberg-rest", name="sail", uri="https://catalog.example.com", warehouse="s3://data/warehouse", bearer_access_token_file="/var/run/secrets/tokens/catalog-token"}]'This example configures a client-side namespace separator fallback.
export SAIL_CATALOG__LIST='[{type="iceberg-rest", name="sail", uri="https://catalog.example.com", namespace_separator="::"}]'