Create the manifest file for an application package

This topic describes how to create the manifest file for an application package.

About the manifest file

The Snowflake Native App Framework requires that every application package contains a manifest file. This file defines properties required by the application package, including the location of the setup script and version definitions.

The manifest file has the following requirements:

  • The name of the manifest file must be manifest.yml.

  • The manifest file must be uploaded to a named stage so that it is accessible when creating an application package or Snowflake Native App.

  • The manifest file must exist at the root of the directory structure on the named stage.

Manifest file reference

The following are the valid properties that the manifest.yml file can contain:

manifest_version:

Specifies the version of the manifest file.

Required

version:

Defines a block containing parameters related to a version.

Optional

name:

Specifies the logical name of the version. This name is used in SQL commands that manage versions.

label:

Specifies a name for the version that is displayed to consumers.

comment:

Specifies a comment for the version. This comment is only visible when the provider runs the SHOW VERSIONS command.

artifacts:

Defines a block related to resources that are distributed from this version of the package.

Required

readme:

Specifies a path to a readme file that provides an overview of the Snowflake Native App in markdown format. In the case of a Streamlit app, if no value is specified for the default_streamlit property, the contents of this file is displayed to consumers when viewing the installed Snowflake Native App.

The location of this file is specified relative to the location of the manifest.yml file.

Optional

setup_script:

Specifies the path and filename of the SQL script that is run when the Snowflake Native App is installed. If you do not specify a value, the default value is setup.sql in the same directory as the manifest.yml file.

Optional

default_streamlit:

If the Snowflake Native App includes a Streamlit app, this property specifies the schema and name of the default Streamlit app available to consumers.

Required if the Snowflake Native App includes a Streamlit app. Optional, otherwise.

configuration:

Specifies a block containing configuration properties for the Snowflake Native App.

Optional

log_level:

Specifies the logging level to use for the installed Snowflake Native App. Refer to Setting log level for information on supported values for this property.

Optional

Default: Off

trace_level:

Specifies the trace event level to use for the installed Snowflake Native App. When a provider enables tracing, a Snowflake Native App automatically captures the start and end times for all queries and stored procedure calls.

Note

Publishing a Snowflake Native App with the trace_level property set to a value other than OFF might expose calls to hidden stored procedures to any user in the consumer account who can view the event table.

See Setting trace level for the supported values of the trace_level property.

Optional

Default: Off

privileges:

Defines a block containing the privileges that the consumer must grant when the Snowflake Native App is installed.

Optional

Default: an empty list

<privilege name>:

Specifies the name of the privilege.

description:

Provides a description of the privilege being requested. The text specified in description is displayed to the consumer when the privilege is displayed in Snowsight using the Python Permission SDK.

You should provide as much information possible about why the Snowflake Native App needs this privilege and if the privilege is required or optional.

Required if privileges is specified.

references:

Defines a block containing the references defined by the provider. The consumer must bind these references to objects within their account.

- <reference name>:

Specifies the name of the reference.

label:

Provides a description of the reference that the consumer can view when the Snowflake Native App is installed.

Required if references is specified.

privileges:

Specifies the privileges required by the reference.

Required if references is specified.

object_type:

Specifies the type of object associated with the reference, for example, an a schema and table, or an API integration.

Required if references is specified.

multi_valued:

Specifies that more than one object is associated with the reference.

Optional.

Default: false

register_callback:

Specifies the name of the callback function used to call the reference.

Required if references is specified.

configuration_callback:

Specifies the name of the callback function that will provide the desired configuration for the object to bind to this reference.

This property is required if object_type is EXTERNAL ACCESS INTEGRATION or SECRET. This property is not applicable to other types of objects.

Manifest file example

The following example shows a typical manifest file with values specified for all supported properties:

manifest_version: 1 # required
version:
  name: hello_snowflake
  label: "v1.0"
  comment: "The first version of a Snowflake Native App"

artifacts:
  readme: readme.md
  setup_script: scripts/setup.sql
  default_streamlit: streamlit/ux_schema.homepage_streamlit

configuration:
  log_level: debug
  trace_level: always

privileges:
  - EXECUTE TASK:
      description: "Run ingestion tasks for replicating Redshift data"
  - EXECUTE MANAGED TASK:
      description: "To run serverless ingestion tasks for replicating Redshift data"
  - CREATE WAREHOUSE:
      description: "To create warehouses for executing tasks"
  - MANAGE WAREHOUSES:
      description: "To manage warehouses for optimizing the efficiency of your accounts"
  - CREATE DATABASE:
      description: "To create sink databases for replicating Redshift data"
  - IMPORTED PRIVILEGES ON SNOWFLAKE DB:
      description: "To access account_usage views"

references:
  - consumer_table:
      label: "Consumer table"
      description: "A table in the consumer account that exists outside the APPLICATION object."
      privileges:
        - SELECT
        - INSERT
        - UPDATE
      object_type: Table
      multi_valued: true
      register_callback: config.register_reference
  - consumer_external_access:
      label: "Consumer external access integration"
      description: "An external access integration in the consumer account that exists outside the APPLICATION object."
      privileges:
        - USAGE
      object_type: EXTERNAL ACCESS INTEGRATION
      register_callback: config.register_reference
      configuration_callback: config.get_configuration_for_reference
Copy