Skip to main content
VeloDB Cloud 26.x is based on Apache Doris 4.x. See Version Mapping.

Iceberg REST Catalog API

Before creating a catalog or running a load or export job, ensure that the warehouse can reach the service endpoint and that its credentials have the required metadata and data permissions. For private endpoints or service-side credential files, coordinate connectivity and provisioning with VeloDB Cloud support.

This document describes the supported parameters when connecting to and accessing metadata services that support the Iceberg REST Catalog interface through the CREATE CATALOG statement.

Parameters​

Property NameLegacy NameDescriptionDefault ValueRequired
iceberg.rest.uriuriSpecifies the REST service address-Yes
warehousewarehouseSpecifies the iceberg warehouse-Yes
iceberg.rest.security.typeSpecifies the REST service authentication method, supports oauth2, defaults to none (no authentication)noneNo
iceberg.rest.oauth2.tokenBearer token when using oauth2 authentication-No
iceberg.rest.oauth2.scopeSpecifies the resource scope and permission level that users can access after authorization when using oauth2 authentication-No
iceberg.rest.oauth2.credentialoauth2 credentials used to access server-uri to obtain token-No
iceberg.rest.oauth2.server-uriURI address for obtaining oauth2 token, used in conjunction with iceberg.rest.oauth2.credential-No
iceberg.rest.vended-credentials-enabledWhether to enable vended-credentials functionality. When enabled, it will obtain storage system access credentials such as access-key and secret-key from the rest server, eliminating the need for manual specification. Requires rest server support for this capability.falseNo
iceberg.rest.nested-namespace-enabledWhether to enable support for Nested Namespace. Default is false. If true, Nested Namespace will be flattened and displayed as Database names, such as parent_ns.child_ns. Some REST Catalog services do not support Nested Namespace, such as AWS Glue, so this parameter should be set to falseNo

Note:

  1. OAuth2 and vended credentials require a compatible REST catalog service.

  2. For compatibility with Apache Doris before 3.1.0, please use the legacy names.

  3. For AWS Glue REST Catalog, please refer to the AWS Glue documentation

Use nested namespaces​

To access nested namespaces, in addition to setting iceberg.rest.nested-namespace-enabled to true in the Catalog properties, you also need to enable the following global parameter:

SET GLOBAL enable_nested_namespace=true;

Assuming the Catalog is "ice", Namespace is "ns1.ns2", and Table is "tbl1", you can access Nested Namespace in the following ways:

mysql> USE ice.ns1.ns2;
mysql> SELECT k1 FROM ice.`ns1.ns2`.tbl1;
mysql> SELECT tbl1.k1 FROM `ns1.ns2`.tbl1;
mysql> SELECT `ns1.ns2`.tbl1.k1 FROM ice.`ns1.ns2`.tbl1;
mysql> SELECT ice.`ns1.ns2`.tbl1.k1 FROM tbl1;
mysql> REFRESH CATALOG ice;
mysql> REFRESH DATABASE ice.`ns1.ns2`;
mysql> REFRESH TABLE ice.`ns1.ns2`.tbl1;

Example configurations​

  • REST catalog service without authentication (isolated test network only)

    CREATE CATALOG minio_iceberg PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'rest',
    'uri' = 'https://<rest-catalog-host>',
    's3.access_key' = '<ak>',
    's3.secret_key' = '<sk>',
    's3.endpoint' = 'https://<object-storage-host>',
    's3.region' = 'us-east-1'
    );
  • Connecting to AWS Glue REST Catalog

    CREATE CATALOG glue_iceberg PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'rest',
    'iceberg.rest.uri' = 'https://glue.<region>.amazonaws.com/iceberg',
    'warehouse' = '<account_id>:s3tablescatalog/<s3_table_bucket_name>',
    'iceberg.rest.sigv4-enabled' = 'true',
    'iceberg.rest.signing-name' = 'glue',
    'iceberg.rest.access-key-id' = '<ak>',
    'iceberg.rest.secret-access-key' = '<sk>',
    'iceberg.rest.signing-region' = '<region>'
    );
  • Connecting to Databricks Unity Iceberg REST Catalog

    CREATE CATALOG unity_iceberg properties(
    "uri" = "https://<databricks-workspace-host>/api/2.1/unity-catalog/iceberg-rest/",
    "type" = "iceberg",
    "warehouse" = "<catalog_name>",
    "iceberg.catalog.type" = "rest",
    "iceberg.rest.security.type" = "oauth2",
    "iceberg.rest.oauth2.token" = "<token>",
    "iceberg.rest.vended-credentials-enabled" = "true",
    's3.endpoint' = 'https://s3.us-east-2.amazonaws.com',
    's3.region' = 'us-east-2'
    );
  • Connecting to Apache Polaris REST Catalog

    -- Enable vended-credentials
    CREATE CATALOG polaris_iceberg PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'rest',
    'iceberg.rest.uri' = 'http://YOUR_POLARIS_HOST:8181/api/catalog',
    'warehouse' = '<catalog_name>',
    'iceberg.rest.security.type' = 'oauth2',
    'iceberg.rest.oauth2.credential' = 'client_id:client_secret',
    'iceberg.rest.oauth2.server-uri' = 'http://YOUR_POLARIS_HOST:8181/api/catalog/v1/oauth/tokens',
    'iceberg.rest.oauth2.scope' = 'PRINCIPAL_ROLE:doris_pr_role',
    'iceberg.rest.vended-credentials-enabled' = 'true',
    's3.endpoint' = 'https://s3.us-west-2.amazonaws.com',
    's3.region' = 'us-west-2'
    );

    -- Disable vended-credentials
    CREATE CATALOG polaris_iceberg PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'rest',
    'iceberg.rest.uri' = 'http://YOUR_POLARIS_HOST:8181/api/catalog',
    'warehouse' = '<catalog_name>',
    'iceberg.rest.security.type' = 'oauth2',
    'iceberg.rest.oauth2.credential' = '6e155b128dc06c13:ce9fbb4cc91c43ff2955f2c6545239d7',
    'iceberg.rest.oauth2.server-uri' = 'http://YOUR_POLARIS_HOST:8181/api/catalog/v1/oauth/tokens',
    'iceberg.rest.oauth2.scope' = 'PRINCIPAL_ROLE:doris_pr_role',
    's3.access_key' = '<ak>',
    's3.secret_key' = '<sk>',
    's3.endpoint' = 'https://s3.us-west-2.amazonaws.com',
    's3.region' = 'us-west-2'
    );
  • Connecting to Snowflake Open Catalog

    -- Enable vended-credentials
    CREATE CATALOG snowflake_open_catalog PROPERTIES (
    'type' = 'iceberg',
    'warehouse' = '<catalog_name>',
    'iceberg.catalog.type' = 'rest',
    'iceberg.rest.uri' = 'https://<open_catalog_account>.snowflakecomputing.com/polaris/api/catalog',
    'iceberg.rest.security.type' = 'oauth2',
    'iceberg.rest.oauth2.credential' = '<client_id>:<client_secret>',
    'iceberg.rest.oauth2.scope' = 'PRINCIPAL_ROLE:<principal_role>',
    'iceberg.rest.vended-credentials-enabled' = 'true',
    's3.endpoint' = 'https://s3.us-west-2.amazonaws.com',
    's3.region' = 'us-west-2',
    'iceberg.rest.nested-namespace-enabled' = 'true'
    );
    -- Disable vended-credentials
    CREATE CATALOG snowflake_open_catalog PROPERTIES (
    'type' = 'iceberg',
    'warehouse' = '<catalog_name>',
    'iceberg.catalog.type' = 'rest',
    'iceberg.rest.uri' = 'https://<open_catalog_account>.snowflakecomputing.com/polaris/api/catalog',
    'iceberg.rest.security.type' = 'oauth2',
    'iceberg.rest.oauth2.credential' = '<client_id>:<client_secret>',
    'iceberg.rest.oauth2.scope' = 'PRINCIPAL_ROLE:<principal_role>',
    's3.access_key' = '<ak>',
    's3.secret_key' = '<sk>',
    's3.endpoint' = 'https://s3.us-west-2.amazonaws.com',
    's3.region' = 'us-west-2',
    'iceberg.rest.nested-namespace-enabled' = 'true'
    );
  • Connecting to Apache Gravitino REST Catalog

    -- Enable vended-credentials
    CREATE CATALOG gravitino_iceberg PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'rest',
    'iceberg.rest.uri' = 'https://<gravitino-host>/iceberg/',
    'warehouse' = 's3://gravitino-iceberg-demo/warehouse',
    'iceberg.rest.vended-credentials-enabled' = 'true',
    's3.endpoint' = 'https://s3.us-west-2.amazonaws.com',
    's3.region' = 'us-west-2'
    );

    -- Disable vended-credentials
    CREATE CATALOG gravitino_iceberg PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'rest',
    'iceberg.rest.uri' = 'https://<gravitino-host>/iceberg/',
    'warehouse' = 's3://gravitino-iceberg-demo/warehouse',
    'iceberg.rest.vended-credentials-enabled' = 'false',
    's3.access_key' = '<ak>',
    's3.secret_key' = '<sk>',
    's3.endpoint' = 'https://s3.us-west-2.amazonaws.com',
    's3.region' = 'us-west-2'
    );
  • Connecting to SeaweedFS REST Catalog

    CREATE CATALOG seaweedfs_iceberg PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'rest',
    'uri' = 'http://<seaweedfs_host>:8181',
    'warehouse' = 's3://<table_bucket_name>',
    'credential' = '<ak>:<sk>',
    's3.access_key' = '<ak>',
    's3.secret_key' = '<sk>',
    's3.endpoint' = 'http://<seaweedfs_host>:8333',
    's3.region' = 'us-west-2',
    'use_path_style' = 'true'
    );

    SeaweedFS table buckets serve the Iceberg REST catalog for table metadata and store the table data as Parquet files behind the same S3 gateway. See Integration with SeaweedFS for a full walkthrough.

Common errors​

For access-denied errors, check the identity and its permissions for both metadata and data. For timeouts, verify the service endpoint and network path from the warehouse. For errors involving a keytab, CA certificate, Hadoop XML file, or JDBC driver, contact VeloDB Cloud support with the error text and the operation that failed.