CREATE EXTERNAL CONSUMER
statementsupportedNative apps, listings & sharingCreates a new external consumer identity, or replaces an existing one, for use with Open Data Sharing. External consumers represent parties outside of Snowflake that access shared Iceberg data using the Iceberg REST Catalog API.
Syntax
supportedpartialnot supportednot scored
CREATE [ OR REPLACE ] EXTERNAL CONSUMER [ IF NOT EXISTS ] <name>
[ REGION = '<region_group>.<snowflake_region>' ]
[ COMMENT = '<string_literal>' ]
[ EMAIL = '<email_address>' ]
Parameters
| Name | Required | Description |
|---|---|---|
name | required | Specifies the identifier for the external consumer. Must be unique within the account. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. |
OR REPLACE | optional | Replaces an existing external consumer with the same name. The existing consumer and its properties are replaced by the new definition. The new external consumer doesn’t inherit the PATs or workload identities of the external consumer that it replaces. Add them again after you replace the consumer. |
IF NOT EXISTS | optional | Creates the external consumer only if one with the same name does not already exist. If one already exists, the command does nothing and completes successfully. OR REPLACE and IF NOT EXISTS are mutually exclusive. |
REGION = 'region_group.snowflake_region' | optional | Specifies the region that Snowflake stores and serves shared data from for the external consumer. For example, 'PUBLIC.AWS_EU_CENTRAL_1'. The region group must be PUBLIC. Only AWS and Azure commercial regions are supported; if you specify an unsupported region, the command fails. For more information, see Share with external consumers in other regions. The region doesn’t restrict where the external consumer’s client connects from. If the region is different from your provider account’s region, Snowflake auto-fulfills any listing that targets this external consumer to that region, which incurs replication and storage costs. For more information, see Auto-fulfillment for listings. If you omit REGION, the external consumer uses the region of your provider account. You can’t change REGION after you create the external consumer. To use a different region, create a new external consumer. |
COMMENT = 'string_literal' | optional | Specifies a comment for the external consumer. |
EMAIL = 'email_address' | optional | Specifies the email address associated with the external consumer. |
Usage notes
- 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.
- External consumers are restricted identities. You cannot grant Snowflake roles or standard user options to an external consumer.
- External consumers authenticate with Programmatic Access Tokens (PATs) or workload identity federation (WIF). See ALTER EXTERNAL CONSUMER … ADD PAT and Workload identity federation for external consumers.
- Each external consumer supports only one region. To serve the same party in more than one region, create a separate external consumer for each region.
- External consumers don’t support failover or disaster recovery (DR) yet.
Access control requirements
A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes CREATE EXTERNAL CONSUMER | Account | Required to create an external consumer. Granted to ACCOUNTADMIN by default. 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.