CREATE ICEBERG CATALOG
The CREATE ICEBERG CATALOG statement creates a named connection to an Iceberg REST catalog. Link the Iceberg catalog to a Redpanda catalog with USING CATALOG so that queries against the linked Redpanda catalog return both live and Iceberg-committed records. Standalone querying against an Iceberg catalog is not supported. See Query Iceberg-enabled Topics for the end-to-end workflow.
The statement requires an existing storage connection that holds the object-storage credentials for the Iceberg warehouse.
|
In Redpanda Cloud, the storage connection and Iceberg catalog used to query Iceberg-enabled topics are configured and managed automatically when you enable Redpanda SQL on a cluster that has an Iceberg REST catalog configured. You don’t run these statements yourself for that workflow. This page documents the statement’s syntax and options so you can understand what Redpanda Cloud configures. See Query Iceberg-enabled topics. |
Syntax
CREATE ICEBERG CATALOG [IF NOT EXISTS] catalog_name STORAGE storage_name
WITH (option = 'value' [, ...]);
-
catalog_name: Name for the new Iceberg catalog. -
IF NOT EXISTS: Optional. Prevents an error if an Iceberg catalog with the same name already exists. -
storage_name: Name of an existing storage connection. Create it first with CREATE STORAGE.
Catalogs are created in the current schema (public by default). To create a catalog in a different schema, qualify the name as schema.catalog_name. The auto-created default_iceberg_catalog is in public.
|
Options
| Option | Type | Required | Description |
|---|---|---|---|
|
STRING |
Yes |
REST catalog endpoint URI. |
|
STRING |
No |
Iceberg warehouse identifier or location. |
|
STRING |
No |
Authentication type for the REST catalog. One of |
|
STRING |
Required when |
GCP project that BigLake API requests are billed and quota-attributed to. |
|
STRING |
Required when |
OAuth2 client ID. |
|
STRING |
Required when |
OAuth2 client secret. |
|
STRING |
No |
OAuth2 scope to request. |
|
STRING |
No |
OAuth2 token endpoint URL. Use to override the catalog’s default token endpoint. |
|
INTEGER |
No |
Number of seconds before token expiry to refresh. Must be between 0 and 2147483647. |
|
STRING |
Required when |
Basic authentication username. |
|
STRING |
Required when |
Basic authentication password. |
|
STRING |
Required when |
AWS region for SigV4 request signing (for example, |
|
STRING |
No |
AWS access key ID for SigV4 signing. Must be set together with |
|
STRING |
No |
AWS secret access key for SigV4 signing. See |
|
STRING |
No |
|
|
STRING |
No |
Path to a CA certificate file used to verify the REST catalog’s TLS certificate. |
|
STRING |
No |
Path to a directory containing CA certificates. |
|
STRING |
No |
Path to a certificate revocation list (CRL) file. |
|
STRING |
No |
|
|
STRING |
No |
Comma-separated list of dotted namespace paths (for example, Validation rules:
|
Examples
Create a basic Iceberg catalog
Connect to a REST catalog without authentication. The catalog uses TLS verification by default.
CREATE ICEBERG CATALOG lakehouse_catalog STORAGE iceberg_storage
WITH (
uri = 'https://catalog.example.com',
warehouse = 's3://warehouse/'
);
Create an Iceberg catalog with OAuth2 authentication
CREATE ICEBERG CATALOG lakehouse_catalog STORAGE iceberg_storage
WITH (
uri = 'https://catalog.example.com',
warehouse = 's3://lakehouse-data/',
auth_type = 'oauth2',
oauth2_client_id = '<client-id>',
oauth2_client_secret = '<client-secret>',
oauth2_scope = 'PRINCIPAL_ROLE:ALL',
oauth2_token_endpoint_url = 'https://auth.example.com/token',
oauth2_token_refresh_margin_seconds = 300
);
Create an Iceberg catalog with basic authentication
CREATE ICEBERG CATALOG lakehouse_catalog STORAGE iceberg_storage
WITH (
uri = 'https://catalog.example.com',
warehouse = 's3://warehouse/',
auth_type = 'basic',
username = '<username>',
password = '<password>'
);
Create an Iceberg catalog with AWS SigV4 authentication
Use for REST catalogs fronted by AWS services (such as AWS Glue).
CREATE ICEBERG CATALOG lakehouse_catalog STORAGE iceberg_storage
WITH (
uri = 'https://catalog.example.com',
warehouse = 's3://warehouse/',
auth_type = 'aws_sigv4',
aws_region = 'us-west-2',
aws_access_key_id = '<access-key-id>',
aws_secret_access_key = '<secret-access-key>'
);
To use the AWS default credential chain (for example, an EC2 instance-profile role), omit aws_access_key_id and aws_secret_access_key. They must be set together or omitted together.
Create an Iceberg catalog for AWS Glue or S3 Tables
AWS Glue and S3 Tables are flat-by-specification backends, meaning they do not support nested namespaces. Use allowed_namespaces to scope discovery to specific databases and avoid requiring the glue:GetDatabases IAM permission. The flat_namespaces option is auto-derived as true when auth_type = 'aws_sigv4' and aws_service_name is glue (default) or s3tables.
CREATE ICEBERG CATALOG glue_cat STORAGE iceberg_storage
WITH (
uri = 'https://glue.us-east-1.amazonaws.com/iceberg',
warehouse = 's3://my-warehouse/',
auth_type = 'aws_sigv4',
aws_region = 'us-east-1',
allowed_namespaces = 'analytics, sales'
-- flat_namespaces is auto-derived as true for Glue/S3 Tables
);
Create an Iceberg catalog for BigLake on GCP
Use auth_type = 'gcp' for a Google Cloud BigLake REST catalog. Redpanda SQL authenticates with Application Default Credentials (ADC), which on Google Kubernetes Engine (GKE) resolves to Workload Identity, so no static key is required. The gcp_project_id option is required. Set uri and warehouse to the values for your BigLake catalog.
CREATE ICEBERG CATALOG biglake_cat STORAGE iceberg_storage
WITH (
uri = '<biglake-rest-catalog-uri>',
warehouse = '<warehouse>',
auth_type = 'gcp',
gcp_project_id = '<gcp-project-id>'
);
Create an Iceberg catalog scoped to specific namespaces (nested backend)
For backends that support nested namespaces (such as Polaris), use multi-segment dotted paths in allowed_namespaces.
CREATE ICEBERG CATALOG polaris_cat STORAGE iceberg_storage
WITH (
uri = 'https://polaris.example.com/api/catalog',
warehouse = 'my_warehouse',
auth_type = 'oauth2',
oauth2_client_id = '<client-id>',
oauth2_client_secret = '<client-secret>',
allowed_namespaces = 'analytics, logs.audit, raw.ingestion.kafka'
);
Related statements
| Statement | Description |
|---|---|
Modify connection properties of an existing Iceberg catalog. |
|
Remove an Iceberg catalog. |
|
Create the storage connection that backs the Iceberg catalog. |
|
Create a Redpanda catalog. Use |