CREATE LISTING

Create a free listing to share directly with specific consumers.

See also:

ALTER LISTING, DESCRIBE LISTING, SHOW LISTINGS, DROP LISTING, Listing manifest reference

Syntax

CREATE EXTERNAL LISTING [ IF NOT EXISTS ] <name>
  [ { SHARE <share_name>  |  APPLICATION PACKAGE <package_name> } ]
  AS '<yaml_manifest_string>'
  [ PUBLISH = { TRUE | FALSE } ]
  [ REVIEW = { TRUE | FALSE } ]
  [ COMMENT = '<string>' ]
Copy

Parameters

name

Specifies the identifier (i.e. name) for the listing. 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 for underscores (_).

AS 'yaml_manifest_string'

Specifies the YAML format manifest for the listing. Refer to Listing manifest reference for details and examples of listing manifest files.

Manifests are normally provided as dollar quoted strings. For more information, see Dollar-Quoted String Constants.

SHARE share_name

Specifies the identifier for the share to attach to the listing.

APPLICATION PACKAGE package_name

Specifies the application package attached to the listing.

See also SHOW APPLICATION PACKAGES.

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.

COMMENT = 'string_literal'

Specifies a comment for the listing.

Default: No value

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.

Access control requirements

A role used to execute this SQL command must have either of the following privileges 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

Refer to Allow accounts to set up Cross-Cloud Auto-Fulfillment.

Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.

A role used to execute this SQL command must have either of the following privileges at a minimum:

For instructions on creating a custom role with a specified set of privileges, refer to creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes

  • Listings created using CREATE LISTING … are automatically published. See ALTER LISTING for information on unpublish and publish operations.

Examples

Create a listing with name ‘MYLISTING’, with specified manifest, and submit for review and subsequent publish.

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: "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 *"
$$
;
Copy

Create a listing with name ‘MYLISTING’, with specified manifest as a draft.

CREATE EXTERNAL LISTING MYLISTING
SHARE MySHARE AS
$$
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 *"
$$ PUBLISH=FALSE REVIEW=FALSE;
Copy
Language: English