CREATE CATALOG INTEGRATION (Delta Sharing)

Creates a new catalog integration in the account, or replaces an existing catalog integration, for Delta tables that are shared from a remote Delta Sharing server.

After you create a Delta Sharing catalog integration, you can use it with a catalog-linked database to read the shared Delta tables from Snowflake.

See also:

ALTER CATALOG INTEGRATION , DROP CATALOG INTEGRATION , SHOW CATALOG INTEGRATIONS, DESCRIBE CATALOG INTEGRATION

Syntax

CREATE [ OR REPLACE ] CATALOG INTEGRATION [ IF NOT EXISTS ] <name>
  CATALOG_SOURCE = DELTA_SHARING
  TABLE_FORMAT = DELTA
  REST_CONFIG = (
    CATALOG_URI = '<delta_sharing_endpoint_url>'
    CATALOG_NAME = 'shares/<share_name>'
    ACCESS_DELEGATION_MODE = VENDED_CREDENTIALS
  )
  REST_AUTHENTICATION = (
    TYPE = BEARER
    BEARER_TOKEN = '<bearer_token>'
  )
  ENABLED = { TRUE | FALSE }
  [ COMMENT = '<string_literal>' ]

Parameters

name

String that specifies the identifier (name) for the catalog integration; must be unique in your account.

In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example, "My object"). Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

CATALOG_SOURCE = DELTA_SHARING

Specifies that the catalog source is a server that complies with the open source Delta Sharing protocol.

TABLE_FORMAT = DELTA

Specifies DELTA as the table format supplied by the catalog. Delta Sharing catalog integrations support only Delta tables.

ENABLED = { TRUE | FALSE }

Specifies whether the catalog integration is available to use.

  • TRUE allows users to use this integration with a catalog-linked database.
  • FALSE prevents users from using this integration with a catalog-linked database.

The value is case-insensitive.

The default is TRUE.

COMMENT = 'string_literal'

String (literal) that specifies a comment for the integration.

Default: No value

REST configuration parameters (restConfigParams)

CATALOG_URI = 'delta_sharing_endpoint_url'

The endpoint URL for your Delta Sharing server. For Databricks Unity Catalog, this is the endpoint value from the recipient credential file that Databricks generates.

For example:

https://oregon.cloud.databricks.com/api/2.0/delta-sharing/metastores/46d301b9-1b7d-48ea-9d2a-48efb54bd280
CATALOG_NAME = 'shares/share_name'

Specifies the Delta Sharing share to use, in the form shares/<share_name>. The share name is the name of the share that the Delta Sharing server exposes to the recipient.

For example, if your share is named sales_share, specify CATALOG_NAME = 'shares/sales_share'.

ACCESS_DELEGATION_MODE = VENDED_CREDENTIALS

Specifies that the catalog integration uses vended credentials returned by the Delta Sharing server to access the underlying table data in cloud storage.

For Delta Sharing, vended credentials are the only supported access delegation mode.

REST authentication parameters (restAuthenticationParams)

TYPE = BEARER

Specifies a bearer token as the authentication type for Snowflake to use to connect to the Delta Sharing server.

Bearer token is the only supported authentication type for Delta Sharing catalog integrations.

BEARER_TOKEN = 'bearer_token'

The bearer token that the Delta Sharing server issued to the recipient. For Databricks Unity Catalog, this is the bearerToken value from the recipient credential file that Databricks generates.

Access control requirements

A role used to execute this operation must have the following privileges at a minimum:

PrivilegeObjectNotes
CREATE INTEGRATIONAccountOnly the ACCOUNTADMIN role has this privilege by default. The privilege can be granted to additional roles as needed.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes

  • A Delta Sharing catalog integration provides read-only access to shared Delta tables. A catalog-linked database that uses a Delta Sharing catalog integration doesn’t support write operations.

  • You can’t modify an existing catalog integration; use a CREATE OR REPLACE CATALOG INTEGRATION statement instead.

  • You can’t drop or replace a catalog integration if one or more Apache Iceberg™ tables are associated with the catalog integration.

    To view the tables that depend on a catalog integration, you can use the SHOW ICEBERG TABLES command and a query using the pipe operator (->>) that filters on the catalog_name column.

    Note

    The column identifier (catalog_name) is case-sensitive. Specify the column identifier exactly as it appears in the SHOW ICEBERG TABLES output.

    For example:

    SHOW ICEBERG TABLES
      ->> SELECT *
            FROM $1
            WHERE "catalog_name" = 'my_catalog_integration_1';
  • Regarding metadata:

    Attention

    Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.

  • The OR REPLACE and IF NOT EXISTS clauses are mutually exclusive. They can’t both be used in the same statement.
  • CREATE OR REPLACE <object> statements are atomic. That is, when an object is replaced, the old object is deleted and the new object is created in a single transaction.

Examples

The following example creates a Delta Sharing catalog integration that connects to a share in Databricks Unity Catalog:

CREATE OR REPLACE CATALOG INTEGRATION uc_bearer_delta_sharing
  CATALOG_SOURCE = DELTA_SHARING
  TABLE_FORMAT = DELTA
  REST_CONFIG = (
    CATALOG_URI = '<endpoint_from_credential>'
    CATALOG_NAME = 'shares/<share_name>'
    ACCESS_DELEGATION_MODE = VENDED_CREDENTIALS
  )
  REST_AUTHENTICATION = (
    TYPE = BEARER
    BEARER_TOKEN = '<bearer_token_from_credential>'
  )
  ENABLED = TRUE;

For a step-by-step walkthrough that includes how to create the share and recipient in Databricks, see Configure a catalog integration for Delta Sharing.