A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/sql/create-catalog-integration-open-catalog below:

Website Navigation


CREATE CATALOG INTEGRATION (Snowflake Open Catalog)

CREATE CATALOG INTEGRATION (Snowflake Open Catalog)

Creates a new catalog integration for Apache Iceberg™ tables that integrate with Snowflake Open Catalog in the account or replaces an existing catalog integration.

You can also use this command to create a catalog integration for Iceberg tables in Apache Polaris™.

See also:

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

Syntax CATALOG_API_TYPE: PUBLIC

Use this catalog integration to connect Snowflake to Open Catalog through the public internet. The default for the CATALOG_API_TYPE parameter is PUBLIC, so you don’t have to specify this parameter.

CREATE [ OR REPLACE ] CATALOG INTEGRATION [ IF NOT EXISTS ]
  <name>
  CATALOG_SOURCE = POLARIS
  TABLE_FORMAT = ICEBERG
  [ CATALOG_NAMESPACE = '<open_catalog_namespace>' ]
  REST_CONFIG = (
    CATALOG_URI = '<open_catalog_account_url>'
    [ CATALOG_API_TYPE = PUBLIC ]
    CATALOG_NAME = '<open_catalog_catalog_name>'
  )
  REST_AUTHENTICATION = (
    TYPE = OAUTH
    OAUTH_CLIENT_ID = '<oauth_client_id>'
    OAUTH_CLIENT_SECRET = '<oauth_secret>'
    OAUTH_ALLOWED_SCOPES = ('<scope 1>', '<scope 2>')
  )
  ENABLED = { TRUE | FALSE }
  [ REFRESH_INTERVAL_SECONDS = <value> ]
  [ COMMENT = '<string_literal>' ]

Copy

CATALOG_API_TYPE: PRIVATE

If you use private connectivity for inbound network traffic in Snowflake Open Catalog, use this catalog integration to connect Snowflake to Open Catalog through a private IP address.

CREATE [ OR REPLACE ] CATALOG INTEGRATION [ IF NOT EXISTS ]
  <name>
  CATALOG_SOURCE = POLARIS
  TABLE_FORMAT = ICEBERG
  [ CATALOG_NAMESPACE = '<open_catalog_namespace>' ]
  REST_CONFIG = (
    CATALOG_URI = '<open_catalog_account_url>'
    CATALOG_API_TYPE = PRIVATE
    CATALOG_NAME = '<open_catalog_catalog_name>'
  )
  REST_AUTHENTICATION = (
    TYPE = OAUTH
    OAUTH_CLIENT_ID = '<oauth_client_id>'
    OAUTH_CLIENT_SECRET = '<oauth_secret>'
    OAUTH_ALLOWED_SCOPES = ('<scope 1>', '<scope 2>')
  )
  ENABLED = { TRUE | FALSE }
  [ REFRESH_INTERVAL_SECONDS = <value> ]
  [ COMMENT = '<string_literal>' ]

Copy

Required 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 = POLARIS

Specifies Snowflake Open Catalog as the catalog source.

TABLE_FORMAT = ICEBERG

Specifies Apache Iceberg™ as the table format supplied by the catalog.

REST_CONFIG = ( ... )

Specifies information about your Open Catalog account and catalog name.

CATALOG_URI = 'https://open_catalog_account_url'

Your Open Catalog account URL. Supported values are:

  • https://<open_catalog_account_identifier>.snowflakecomputing.com/polaris/api/catalog: When CATALOG_API_TYPE = PUBLIC. Examples values:

    • https://<orgname>-<my-snowflake-open-catalog-account-name>.snowflakecomputing.com/polaris/api/catalog

    • https://<account_locator>.<cloud_region_id>.<cloud>.snowflakecomputing.com/polaris/api/catalog

  • https://<open_catalog_privatelink_account_url>/polaris/api/catalog: When CATALOG_API_TYPE = PRIVATE.

    Note

    For <open_catalog_privatelink_account_url>, enter one of the following values:

    • PrivateLink Account URL

    • Regionless PrivateLink Account URL

    To obtain these values, retrieve your Open Catalog account settings for private connectivity. For details, see the instructions for the cloud platform where your Open Catalog account is hosted:

CATALOG_API_TYPE = { PRIVATE | PUBLIC }

Specifies the catalog API type. If your connection between Snowflake and Open Catalog should be routed through the public internet, this parameter is optional.

Default: PUBLIC

CATALOG_NAME = 'open_catalog_name'

Specifies the name of the catalog to use in Open Catalog.

REST_AUTHENTICATION = ( ... )

Specifies authentication details that Snowflake uses to connect to Open Catalog.

TYPE = OAUTH

Specifies OAuth as the authentication type to use.

OAUTH_CLIENT_ID = 'oauth_client_id'

The client ID of the OAuth2 credential associated with your Open Catalog service connection.

OAUTH_CLIENT_SECRET = 'oauth_secret'

The secret of the OAuth2 credential associated with your Open Catalog service connection.

OAUTH_ALLOWED_SCOPES = ( 'scope_1', 'scope_2')

One or more scopes for the OAuth token.

ENABLED = {TRUE | FALSE}

Specifies whether the catalog integration is available to use for Iceberg tables.

  • TRUE allows users to create new Iceberg tables that reference this integration. Existing Iceberg tables that reference this integration function normally.

  • FALSE prevents users from creating new Iceberg tables that reference this integration. Existing Iceberg tables that reference this integration cannot access the catalog in the table definition.

Optional parameters
CATALOG_NAMESPACE = 'open_catalog_namespace'
REFRESH_INTERVAL_SECONDS = value

Specifies the number of seconds that Snowflake waits between attempts to poll the external Iceberg catalog for metadata updates for automated refresh.

For Delta-based tables, specifies the number of seconds that Snowflake waits between attempts to poll your external cloud storage for new metadata.

Values: 30 to 86400, inclusive

Default: 30 seconds

COMMENT = 'string_literal'

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

Default: No value

Access control requirements

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

Privilege

Object

Notes

CREATE INTEGRATION

Account

Only 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 Examples

The following example creates a catalog integration for Open Catalog for a particular namespace in an internal catalog in Open Catalog to query tables grouped under this namespace in Snowflake. For more information about internal catalogs in Open Catalog, see Catalog types in the Open Catalog documentation.

CREATE OR REPLACE CATALOG INTEGRATION open_catalog_int
  CATALOG_SOURCE = POLARIS
  TABLE_FORMAT = ICEBERG
  CATALOG_NAMESPACE = 'my_catalog_namespace'
  REST_CONFIG = (
    CATALOG_URI = 'https://my_org_name-my_snowflake_open_catalog_account_name.snowflakecomputing.com/polaris/api/catalog'
    CATALOG_NAME = 'my_catalog_name'
  )
  REST_AUTHENTICATION = (
    TYPE = OAUTH
    OAUTH_CLIENT_ID = 'my_client_id'
    OAUTH_CLIENT_SECRET = 'my_client_secret'
    OAUTH_ALLOWED_SCOPES = ('PRINCIPAL_ROLE:ALL')
  )
  ENABLED = TRUE;

Copy

The following example creates a catalog integration for Open Catalog to sync Snowflake-managed tables to the customers catalog in Open Catalog, which is an external catalog. For more information about external catalogs in Open Catalog, see Catalog types in the Open Catalog documentation.

CREATE OR REPLACE CATALOG INTEGRATION open_catalog_int2
  CATALOG_SOURCE = POLARIS
  TABLE_FORMAT = ICEBERG
  REST_CONFIG = (
    CATALOG_URI = 'https://my_org_name-my_snowflake_open_catalog_account_name.snowflakecomputing.com/polaris/api/catalog'
    CATALOG_NAME = 'customers'
  )
  REST_AUTHENTICATION = (
    TYPE = OAUTH
    OAUTH_CLIENT_ID = 'my_client_id'
    OAUTH_CLIENT_SECRET = 'my_client_secret'
    OAUTH_ALLOWED_SCOPES = ('PRINCIPAL_ROLE:my-principal-role', 'PRINCIPAL_ROLE:my-principal-role2', 'PRINCIPAL_ROLE:my-principal-role3')
  )
  ENABLED = TRUE;

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4