Configure a catalog integration for Iceberg tables

A catalog integration is a named, account-level Snowflake object that stores information about how your table metadata is organized when you don’t use Snowflake as the Iceberg catalog. For example, you need a catalog integration if your table is managed by AWS Glue.

A single catalog integration can support one or more Iceberg tables that use the same external catalog.

To create an Iceberg table that uses an external Iceberg catalog, or no catalog at all, you must specify a catalog integration.

Note

A catalog integration is required only when you want to create a read-only Iceberg table using an external Iceberg catalog. You don’t need a catalog integration to create an Iceberg table that uses Snowflake as the Iceberg catalog. To use Snowflake as your catalog, set the CATALOG parameter to SNOWFLAKE in the CREATE ICEBERG TABLE (Snowflake as the Iceberg catalog) command.

Create a catalog integration

You can create and configure a catalog integration to use with one or more Iceberg tables.

For specific instructions, see the following topics:

Set a catalog at the account, database, or schema level

To define which catalog to use for Iceberg tables, you can set the CATALOG parameter at the following levels:

Account:

Account administrators can use the ALTER ACCOUNT command to set the parameter for the account. If the value is set for the account, all Iceberg tables created in the account that use an external catalog use this catalog integration by default.

Object:

Users can execute the appropriate CREATE <object> or ALTER <object> command to override the CATALOG parameter value at the database or schema level. The lowest-scoped declaration is used: schema > database > account.

In addition to the minimum privileges required to modify an object using the appropriate ALTER <object_type> command, a role must have the USAGE privilege on the catalog integration.

Note

Changes to the CATALOG parameter only apply to tables created after the change. Existing tables continue to use the catalog integration specified when they were created.

Example

The following statement sets a catalog integration (shared_catalog_integration) for a database named my_database_1:

ALTER DATABASE my_database_1
  SET CATALOG = 'shared_catalog_integration';
Copy

After setting a catalog integration at the database level, you can create an Iceberg table in that database without specifying a catalog integration. The following statement creates an Iceberg table from metadata in object storage in my_database_1 that uses the default catalog integration (shared_catalog_integration) set for the database.

CREATE ICEBERG TABLE my_iceberg_table
   EXTERNAL_VOLUME='my_external_volume'
   METADATA_FILE_PATH='path/to/metadata/v1.metadata.json';
Copy