CREATE LISTING | Snowflake Documentation (original) (raw)
Create a free listing to share directly with specific consumers, with an inline YAML manifest, or from a file located in a stage location.
See also:
ALTER LISTING, DESCRIBE LISTING, SHOW LISTINGS, SHOW VERSIONS IN LISTING, DROP LISTING, Listing manifest reference
Syntax¶
CREATE EXTERNAL LISTING [ IF NOT EXISTS ] [ { SHARE | APPLICATION PACKAGE } ] AS '' [ PUBLISH = { TRUE | FALSE } ] [ REVIEW = { TRUE | FALSE } ] [ COMMENT = '' ]
CREATE EXTERNAL LISTING [ IF NOT EXISTS ] [ { SHARE | APPLICATION PACKAGE } ] FROM '' [ PUBLISH = { TRUE | FALSE } ] [ REVIEW = { TRUE | FALSE } ]
Parameters¶
_name_
Specifies the listing identifier (name). It must conform to the following:
- Must be unique within an organization, regardless of which Snowflake Region the account is located in.
- Must start with an alphabetic character and cannot contain spaces or special characters except forunderscores (
_
).
SHARE _sharename_
Specifies the identifier for the share to attach to the listing.
APPLICATION PACKAGE _packagename_
Specifies the application package attached to the listing.
See also SHOW APPLICATION PACKAGES.
AS '_yamlmanifeststring_'
Specifies the YAML manifest for the listing. For manifest parameters, see Listing manifest reference.
Manifests are normally provided as dollar quoted strings. For more information, see Dollar-quoted string constants.
FROM '_yamlmanifeststagelocation_'
Specifies the path for the internal or repository stage manifest.yml file.
PUBLISH = { TRUE | FALSE }
Specifies how the listing should be published.
If TRUE, listing is published immediately on listing to Marketplace Ops for review.
Default: TRUE.
REVIEW = { TRUE | FALSE }
Specifies whether the listing should or should not submitted to Marketplace Ops review.
Default: TRUE.
Different combinations of values for the PUBLISH and REVIEW properties result in the following behaviors:
PUBLISH | REVIEW | Behavior |
---|---|---|
TRUE | TRUE | Request review then immediately publish after approval. |
TRUE | FALSE | Results in an error. You cannot publish a listing on the Snowflake Marketplace without review. |
FALSE | TRUE | Request a review without publishing automatically after review. |
FALSE | FALSE | Save your listing as a draft without requesting review or publishing. |
COMMENT = '_stringliteral_'
A comment for the listing.
Default: No value
Access control requirements¶
A role used to execute this operation must have the followingprivileges at a minimum:
Privilege | Object | Notes |
---|---|---|
CREATE DATA EXCHANGE LISTING | Account | Only the ACCOUNTADMIN role has this privilege by default. The privilege can be granted to additional roles as needed. |
Delegated privileges to configure cross-cloud auto-fulfillment. | If the ALTER command is modifying the manifest content for auto-fulfillment. | See Configure Cross-Cloud Auto-Fulfillment. |
The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.
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 onsecurable objects, see Overview of Access Control.
Usage notes¶
- Listings created using CREATE LISTING … are automatically published. For information about unpublish and publish operations, see ALTER LISTING.
Examples¶
Creates a listing named ‘MYLISTING’ with a specific YAML format manifest, and submits it for review and subsequent publication.
For additional examples and use-cases associated with managing listings using SQL, see Manage listings with SQL as a provider - examples.
Note
This example uses the default values for PUBLISH and REVIEW.
CREATE EXTERNAL LISTING MYLISTING SHARE MySHARE AS title:"MyListing"subtitle:"SubtitleforMyListing"description:"DescriptionforMyListing"listingterms:type:"STANDARD"targets:accounts:["Org1.Account1"]usageexamples:−title:"thisisatestsql"description:"Simpleexample"query:"select∗"title: "MyListing" subtitle: "Subtitle for MyListing" description: "Description for MyListing" listing_terms: type: "STANDARD" targets: accounts: ["Org1.Account1"] usage_examples: - title: "this is a test sql" description: "Simple example" query: "select *"title:"MyListing"subtitle:"SubtitleforMyListing"description:"DescriptionforMyListing"listingterms:type:"STANDARD"targets:accounts:["Org1.Account1"]usageexamples:−title:"thisisatestsql"description:"Simpleexample"query:"select∗" ;
Creates a draft listing named ‘MYLISTING’ with a specific YAML format manifest:
CREATE EXTERNAL LISTING MYLISTING SHARE MySHARE AS title:"MyListing"subtitle:"SubtitleforMyListing"description:"DescriptionforMyListing"listingterms:type:"OFFLINE"targets:regions:["PUBLIC.AWSUSEAST1","PUBLIC.AZUREWESTUS2"]usageexamples:−title:"thisisatestsql"description:"Simpleexample"query:"select∗"title: "MyListing" subtitle: "Subtitle for MyListing" description: "Description for MyListing" listing_terms: type: "OFFLINE" targets: regions: ["PUBLIC.AWS_US_EAST_1", "PUBLIC.AZURE_WESTUS2"] usage_examples:
- title: "this is a test sql" description: "Simple example" query: "select *"title:"MyListing"subtitle:"SubtitleforMyListing"description:"DescriptionforMyListing"listingterms:type:"OFFLINE"targets:regions:["PUBLIC.AWSUSEAST1","PUBLIC.AZUREWESTUS2"]usageexamples:−title:"thisisatestsql"description:"Simpleexample"query:"select∗" PUBLISH=FALSE REVIEW=FALSE;
Creates a draft listing named ‘MYLISTING’ from a specific stage location. In the following example, the manifest.yml
file is located in the listingmanifests
folder in the stage named listingstage
.
CREATE EXTERNAL LISTING MYLISTING SHARE MySHARE FROM @dbforstage.public.listingstage/listingmanifests;