Configure an external volume for Iceberg tables

An external volume is a named, account-level Snowflake object that you use to connect Snowflake to your external cloud storage for Iceberg tables. An external volume stores an identity and access management (IAM) entity for your storage location. Snowflake uses the IAM entity to securely connects to your storage for accessing table data, Iceberg metadata, and manifest files that store the table schema, partitions, and other metadata.

A single external volume can support one or more Iceberg tables.

You must create an external volume before you can create an Iceberg table.

Create an external volume

The steps to create an external volume depend on your cloud storage provider.

For instructions, see the following topics:

Set an external volume at the account, database, or schema level

To define which existing external volume to use for Iceberg tables, you can set the EXTERNAL_VOLUME 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 read from and write to this external volume by default.

Object:

Users can execute the appropriate CREATE <object> or ALTER <object> command to override the EXTERNAL_VOLUME 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 external volume.

Note

Changes to the EXTERNAL_VOLUME parameter only apply to tables created after the change. Existing tables continue to use the external volume specified when they were created.

Example

The following statement sets an external volume (my_s3_vol) for a database named my_database_1:

ALTER DATABASE my_database_1
  SET EXTERNAL_VOLUME = 'my_s3_vol';
Copy

After setting an external volume at the database level, you can create an Iceberg table in that database without specifying an external volume. The following statement creates an Iceberg table in my_database_1 that uses Snowflake as the catalog and uses the default external volume (my_s3_vol) set for the database.

CREATE ICEBERG TABLE iceberg_reviews_table (
  id STRING,
  product_name STRING,
  product_id STRING,
  reviewer_name STRING,
  review_date DATE,
  review STRING
)
CATALOG = 'SNOWFLAKE'
BASE_LOCATION = 'my/product_reviews/';
Copy