CREATE APPLICATION PACKAGE

statementpartialNative apps, listings & sharing

docs.snowflake.com ↗

Object: APPLICATION PACKAGE

Creates a new application package that contains the data content and application logic of Snowflake Native App. An application package contains the following information about an app: - The version and patch number of the app. - The data content that is available to the application. - The setup script of the app. - The manifest file of the app. The Snowflake Native App Framework is generally available on supported cloud platforms. For additional information, see Support for private connectivity, VPS, and government regions.

Syntax

supportedpartialnot supportednot scored

CREATE APPLICATION PACKAGE [ IF NOT EXISTS ] <name>
  [ DATA_RETENTION_TIME_IN_DAYS = <integer> ]
  [ MAX_DATA_EXTENSION_TIME_IN_DAYS = <integer> ]
  [ DEFAULT_DDL_COLLATION = '<collation_specification>' ]
  [ COMMENT = '<string_literal>' ]
  [ DISTRIBUTION = { INTERNAL | EXTERNAL } ]
  [ LISTING_AUTO_REFRESH = { TRUE | FALSE } ]
  [ MULTIPLE_INSTANCES = TRUE ]
  [ ENABLE_RELEASE_CHANNELS = { TRUE | FALSE } ]
  [ AUTOMATIC_APPLICATION_MAINTENANCE = { TRUE | FALSE } ]
  [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , ... ] ) ]

Parameters

NameRequiredDescription
namerequiredSpecifies the identifier for the application package; must be unique for your account. In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g. "My object"). Identifiers enclosed in double quotes are also case-sensitive. For more details, see Identifier requirements.
DATA_RETENTION_TIME_IN_DAYS = integeroptionalSpecifies the default Time Travel retention time for all schemas created in the application package. Note CLONE and UNDROP are not supported for APPLICATION PACKAGE objects. Despite these operations being listed in the parameter description for consistency with other database objects, neither operation can be performed on an application package. For more details, see Understanding & using Time Travel. For a detailed description of this object-level parameter, as well as more information about object parameters, see Parameters. Values: Standard Edition: 0 or 1 Enterprise Edition: 0 to 90 for permanent databases Default: Standard Edition: 1 Enterprise Edition (or higher): 1 (unless a different default value was specified at the account level) Note A value of 0 disables Time Travel for the database.
MAX_DATA_EXTENSION_TIME_IN_DAYS = integeroptionalObject parameter that specifies the maximum number of days for which Snowflake can extend the data retention period for tables in the application package to prevent streams on the tables from becoming stale. For a detailed description of this parameter, see MAX_DATA_EXTENSION_TIME_IN_DAYS.
DEFAULT_DDL_COLLATION = 'collation_specification'optionalSpecifies a default collation specification for all schemas and tables added to the application package. The default can be overridden at the schema and individual table level. For more details about the parameter, see DEFAULT_DDL_COLLATION.
COMMENT = 'string_literal'optionalSpecifies a comment for the application package. Default: No value
TAG ( tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ] )optionalSpecifies the tag name and the tag string value. The tag value is always a string, and the maximum number of characters for the tag value is 256. For information about specifying tags in a statement, see Tag quotas.
DISTRIBUTION = { INTERNAL | EXTERNAL }optionalSpecifies the type of listing a provider can create when using the application package as the data product of a listing. INTERNAL indicates that a provider can only create a private listing within the same organization where the application package was created. The automated security scan is not performed when the DISTRIBUTION property is set to INTERNAL. EXTERNAL indicates that a provider can create listings outside the same organization where the application package was created. See Run the automated security scan for information on setting the DISTRIBUTION property and the automated security scan. Note Setting the DISTRIBUTION parameter to EXTERNAL triggers an automated security review for each active version and patch defined in the application package. The following restrictions apply until the automated security review has a status of APPROVED: You cannot set a release directive for a version or patch. You cannot publish a listing for the application package.
LISTING_AUTO_REFRESH = { TRUE | FALSE}optionalWhen set to TRUE, initiates replication to all remote regions when there is a change to the release directive of the application package. When a release directive changes, the application package does not wait for the Cross-Cloud Auto-Fulfillment schedule. Default: TRUE
MULTIPLE_INSTANCES = TRUEoptionalEnables the consumer to install multiple instances of an app from the application package. This property cannot be set for applications packages that are included in a trial or paid listing. When multiple instances are allowed, consumers can install a maximum of 30 instances of an app in their account. Caution After this property is set to TRUE, it cannot be set to FALSE or unset later.
ENABLE_RELEASE_CHANNELS = { TRUE | FALSE }optionalEnables or disables release channels for the application package. TRUE enables release channels. This is the default. You can also omit this parameter; release channels are enabled automatically. FALSE disables release channels. Specify this value at create time to opt out of release channels and use the legacy version and patch management workflow instead. Caution After this property is set to TRUE, it cannot be set to FALSE or unset later.
AUTOMATIC_APPLICATION_MAINTENANCE = { TRUE | FALSE }optionalWhen set to TRUE, aligns Snowpark Container Services compute pool node software upgrades with the consumer’s maintenance window. The application upgrades first, then any compute pool node maintenance follows within the same maintenance window. Default: FALSE For more information, see Consumer-controlled maintenance policies: Provider guide.

Usage notes

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes CREATE APPLICATION PACKAGE | Account | Only the ACCOUNTADMIN role has this privilege by default. The privilege can be granted to other roles as needed. 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.

Known gaps

Parts not fully supported, and recorded divergences from Snowflake.

See also

Referenced by