This section provides an overview of the syntax for all types of Iceberg tables.
The syntax for creating an Iceberg table varies considerably depending on whether you use Snowflake as the Iceberg catalog
or an external Iceberg catalog.
To view the syntax, parameter descriptions, usage notes, and examples for specific use cases, see the following pages:
To automatically bring the tables in your remote REST catalog into Snowflake, you can create a catalog-linked database. With a
catalog-linked database, you don’t need to create individual externally managed
Iceberg tables to access the existing tables in your remote catalog from Snowflake. In addition, you can use the Variant syntax
or CREATE ICEBERG TABLE (catalog-linked database) … AS SELECT variant syntax with your catalog-linked database to create
new remote Iceberg tables from Snowflake.
Snowflake represents columns defined as PRIMARY KEY as identifier fields in the Iceberg metadata. The IDs for these columns are populated
in the metadata as identifier field IDs.
Snowflake doesn’t enforce NOT NULL and UNIQUE constraints on PRIMARY KEY columns for Iceberg tables.
To automatically bring the tables in your remote REST catalog into Snowflake, create a catalog linked database.
With a catalog-linked database, you don’t have to create individual externally managed Iceberg tables to bring your remote tables into
Snowflake.
CREATE[OR REPLACE]ICEBERGTABLE[IF NOT EXISTS]<table_name>[EXTERNAL_VOLUME='<external_volume_name>'][CATALOG='<catalog_integration_name>']CATALOG_TABLE_NAME='<rest_catalog_table_name>'[CATALOG_NAMESPACE='<catalog_namespace>'][PATH_LAYOUT={FLAT|HIERARCHICAL}][TARGET_FILE_SIZE='{ AUTO | 16MB | 32MB | 64MB | 128MB }'][REPLACE_INVALID_CHARACTERS={TRUE|FALSE}][AUTO_REFRESH={TRUE|FALSE}][COMMENT='<string_literal>'][STORAGE_SERIALIZATION_POLICY={COMPATIBLE|OPTIMIZED}][ICEBERG_MERGE_ON_READ_BEHAVIOR={'AUTO'|'ENABLED'|'DISABLED'}][ENABLE_ICEBERG_MERGE_ON_READ={TRUE|FALSE}][[WITH]TAG(<tag_name>='<tag_value>'[,<tag_name>='<tag_value>',...])][WITHCONTACT(<purpose>=<contact_name>[,<purpose>=<contact_name>...])]
CREATE[OR REPLACE]ICEBERGTABLE[IF NOT EXISTS]<table_name>[EXTERNAL_VOLUME='<external_volume_name>'][CATALOG='<catalog_integration_name>']BASE_LOCATION='<relative_path_from_external_volume>'[REPLACE_INVALID_CHARACTERS={TRUE|FALSE}][AUTO_REFRESH={TRUE|FALSE}][COMMENT='<string_literal>'][[WITH]TAG(<tag_name>='<tag_value>'[,<tag_name>='<tag_value>',...])][WITHCONTACT(<purpose>=<contact_name>[,<purpose>=<contact_name>...])]
CREATE[OR REPLACE]ICEBERGTABLE[IF NOT EXISTS]<table_name>[EXTERNAL_VOLUME='<external_volume_name>'][CATALOG='<catalog_integration_name>']METADATA_FILE_PATH='<metadata_file_path>'[REPLACE_INVALID_CHARACTERS={TRUE|FALSE}][COMMENT='<string_literal>'][[WITH]TAG(<tag_name>='<tag_value>'[,<tag_name>='<tag_value>',...])][WITHCONTACT(<purpose>=<contact_name>[,<purpose>=<contact_name>...])]