ALTER LISTING¶
Modifies the properties of a listing.
Syntax¶
ALTER LISTING [ IF EXISTS ] <name>
[ { PUBLISH | UNPUBLISH } ]
[ COMMENT = '<string>'' ]
ALTER LISTING [ IF EXISTS ] <name> [ { PUBLISH | UNPUBLISH } ]
[ COMMENT = '<string>'' ]
ALTER LISTING [ IF EXISTS ] <name> AS '<yaml_manifest_string>'
[ PUBLISH={ TRUE | FALSE } ]
[ REVIEW= { TRUE | FALSE } ]
[ COMMENT = '<string>' ]
ALTER LISTING [ IF EXISTS ] <name> RENAME TO <new_name>;
ALTER LISTING [ IF EXISTS ] <name> SET COMMENT = '<string>'
Parameters¶
name
Specifies the identifier (i.e. name) for the listing being altered.
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.
RENAME TO new_name
Specifies the new identifier for the listing which must be unique. The new identifier cannot be used if the identifier is already in place for a different listing.
{ PUBLISH | UNPUBLISH }
Specifies the action to perform on the listing:
PUBLISH
Makes a previously undiscoverable listing discoverable.Specifying PUBLISH on a previously published listing has no effect.
UNPUBLISH
Makes a previously discoverable listing undiscoverable for new consumers. Existing consumers can continue to access the data associated with an unpublished listing.Specifying UNPUBLISH on a previously unpublished listing has no effect.
See also Unpublish a listing.
SET ...
Specifies one (or more) properties to set for the listing (separated by blank spaces, commas, or new lines).
COMMENT = 'string_literal'
Adds a comment or overwrites the existing comment for an existing listing.
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. |
Usage notes¶
Listings can be renamed only in DRAFT state.
Access control requirements¶
A role used to execute this SQL command must have either of the following privileges at a minimum:
Privilege |
Object |
Notes |
---|---|---|
OWNERSHIP or MODIFY |
On the listing being modified. |
|
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.
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.
Examples¶
Alter listing MY_LISTING to use an updated manifest file:
ALTER LISTING MYLISTING AS $$ title: "MyListing" subtitle: "Subtitle for MyListing" description: "Description or MyListing" listing_terms: type: "STANDARD" targets: accounts: ["Org1.Account1"] usage_examples: - title: "this is a test sql" description: "Simple example" query: "select *" $$
Alter listing MYLISTING, publishing the listing:
ALTER LISTING MYLISTING PUBLISH;
Alter listing MYLISTING, unpublishing the listing.
ALTER LISTING MYLISTING UNPUBLISH;
Alter listing MYLISTING, setting a new comment:
ALTER LISTING MYLISTING SET COMMENT = 'My listing is ready!';