CREATE APPLICATION

Erstellt eine Snowflake Native App basierend auf einem Anwendungspaket oder einem Freigabeangebot. Anbieter verwenden diesen Befehl, um eine App in ihrem Entwicklungskonto zu installieren.

When this command runs, it runs the setup script to create the app.

Siehe auch:

ALTER APPLICATION, DESCRIBE APPLICATION, DROP APPLICATION, SHOW APPLICATIONS

Syntax

CREATE APPLICATION <name> FROM APPLICATION PACKAGE <package_name>
   [ USING RELEASE CHANNEL { QA | ALPHA | DEFAULT } ]
   [ COMMENT = '<string_literal>' ]
   [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , ... ] ) ]
   [ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
   [ WITH FEATURE POLICY = <policy_name> ]

CREATE APPLICATION <name> FROM APPLICATION PACKAGE <package_name>
  USING <path_to_version_directory>
  [ DEBUG_MODE = { TRUE | FALSE } ]
  [ COMMENT = '<string_literal>' ]
  [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [, ...] ) ]
  [ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
  [ WITH FEATURE POLICY = <policy_name> ]


CREATE APPLICATION <name> FROM APPLICATION PACKAGE <package_name>
  USING VERSION  <version_identifier> [ PATCH <patch_num> ]
  [ DEBUG_MODE = { TRUE | FALSE } ]
  [ COMMENT = '<string_literal>' ]
  [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , ... ] ) ]
  [ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
  [ WITH FEATURE POLICY = <policy_name> ]

CREATE APPLICATION <name> FROM LISTING <listing_name>
   [ USING RELEASE CHANNEL { QA | ALPHA | DEFAULT } ]
   [ COMMENT = '<string_literal>' ]
   [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , ... ] ) ]
   [ BACKGROUND_INSTALL = { TRUE | FALSE } ]
   [ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
   [ WITH FEATURE POLICY = <policy_name> ]
Copy

Erforderliche Parameter

name

Specifies the identifier for the app. Must be unique for your account.

Darüber hinaus muss der Bezeichner mit einem Buchstaben beginnen und darf keine Leer- oder Sonderzeichen enthalten, es sei denn, die gesamte Bezeichnerzeichenfolge wird in doppelte Anführungszeichen gesetzt (z. B. "My object"). Bei Bezeichnern, die in doppelte Anführungszeichen eingeschlossen sind, ist auch die Groß-/Kleinschreibung zu beachten.

Weitere Informationen dazu finden Sie unter Anforderungen an Bezeichner.

FROM APPLICATION PACKAGE package_name

Specifies the name of the application package used to create the app. To use this clause to create an app from an application package without specifying a stage or a version/patch, the application package must have a default release directive defined.

This clause can only be used to create an app in the same account as the application package. This clause cannot be used to create an app in development mode.

FROM LISTING listing_name

Specifies the name of the listing that contains the application package used to create the app.

USING RELEASE CHANNEL QA | ALPHA | DEFAULT

Gibt den Release-Kanal an, der im Anwendungspaket oder im Freigabeangebot definiert ist, das zum Erstellen der App verwendet wurde. Wenn Sie diese Klausel nicht angeben, wird der Standard-Release-Kanal verwendet.

  • QA gibt den Release-Kanal für die Qualitätssicherung an.

  • ALPHA gibt den Alpha-Release-Kanal an.

  • DEFAULT gibt den Standard-Release-Kanal an.

This clause can be used only when creating an app from an application package that has a release directive defined or when creating an app from a listing.

USING path_to_version_directory

Specifies the path to the stage that contains the files required by the app.

USING version [ PATCH patch_num ]

Specifies the version, and optionally the patch, defined in the application package used to create the app.

Optionale Parameter

COMMENT = 'string_literal'

Specifies a comment for the app.

Standard: Kein Wert

DEBUG_MODE = { TRUE | FALSE }

Enables or disables debug mode for the app being created. Debug mode allows a provider to see the contents of the app.

  • TRUE enables debug mode for the installed app.

  • FAlSE disables debug mode for the installed app.

Bemerkung

You can only enable debug mode under the following conditions:

  • The app is in the same account as the application package.

  • The app is being created based on a specific version or from files on a named stage.

TAG ( tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ] )

Gibt den Namen des Tags und den Wert der Tag-Zeichenfolge an.

Der Tag-Wert ist immer eine Zeichenfolge, die maximale 256 Zeichen lang sein kann.

Weitere Informationen zur Angabe von Tags in einer Anweisung finden Sie unter Tag quotas.

BACKGROUND_INSTALL = { TRUE | FALSE }

Creates the app from a listing in the background. If you specify this clause, the command returns you to the prompt immediately, and the installation process continues in the background. To monitor that status of the installation, use the DESCRIBE APPLICATION command.

Bemerkung

When this clause is used, the app is created even if the command fails. In this situation, use the DROP APPLICATION command to delete the object before running the CREATE APPLICATION command again.

Diese Klausel wird hauptsächlich von Snowsight verwendet, um eine Snowflake Native App im Hintergrund zu installieren. Die Installation im Hintergrund ermöglicht es dem Verbraucher, während der Installation des Freigabeangebots in Snowsight an andere Stellen zu navigieren. Ein Anbieter kann diese Klausel verwenden, um die Installation einer Snowflake Native App aus einem Freigabeangebot zu testen, bevor das Angebot veröffentlicht wird.

AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE }

Aktiviert Protokollierung und Ereignisfreigabe in der App.

WITH FEATURE POLICY = policy_name

Erstellen Sie die Anwendung mit der angegebenen Feature-Richtlinie. Wenn die Anwendung versucht, ein Objekt zu erstellen, das die Feature-Richtlinie verbietet (z. B. eine Datenbank), schlägt der Befehl fehl.

Anforderungen an die Zugriffssteuerung

Eine Rolle, die zur Ausführung dieser Operation verwendet wird, muss mindestens die folgenden Berechtigungen haben:

Berechtigung

Objekt

Anmerkungen

CREATE APPLICATION

Konto

DEVELOP

Anwendungspaket

INSTALL

Anwendungspaket

IMPORT SHARE

CREATE APPLICATION

Konto

Diese Berechtigungen sind erforderlich, um eine Anwendung in einem anderen Konto als dem Konto zu erstellen, welches das Anwendungspaket enthält.

APPLY FEATURE POLICY

APPLY oder OWNERSHIP

Konto

Feature-Richtlinie

Diese Berechtigungen sind erforderlich, um eine Feature-Richtlinie anzuwenden, wenn Sie die Anwendung mit der WITH FEATURE POLICY-Klausel erstellen.

Nutzungshinweise

  • To create an app directly from an application package, you must specify a default release directive in the application package.

  • The app differs from a database in the following ways:

    • An app may not be transient.

    • The role with the OWNERSHIP privilege on the app has the following abilities and limitations:

      • Can drop the database or modify the COMMENT property and any properties that are specific to the app.

      • Cannot see or modify the contents of the app except via the privileges granted the application roles.

      • Kann kein Objekt auf Datenbankebene erstellen, wie ein Schema oder eine Datenbankrolle.

  • Metadaten:

    Achtung

    Kunden müssen sicherstellen, dass bei der Nutzung des Snowflake-Dienstes keine personenbezogenen Daten (außer für ein Objekt „User“), sensible Daten, exportkontrollierte Daten oder andere regulierte Daten als Metadaten eingegeben werden. Weitere Informationen dazu finden Sie unter Metadatenfelder in Snowflake.

  • CREATE OR REPLACE <Objekt>-Anweisungen sind atomar. Das heißt, wenn ein Objekt ersetzt wird, erfolgt das Löschen des alten Objekts und das Erstellen des neuen Objekts in einer einzigen Transaktion.

Beispiele

CREATE APPLICATION hello_snowflake_app
  FROM APPLICATION PACKAGE hello_snowflake_package
  USING VERSION v1;
Copy
+---------------------------------------------------------+
| status                                                  |
|---------------------------------------------------------|
| Application 'hello_snowflake_app' created successfully. |
+---------------------------------------------------------+
CREATE APPLICATION hello_snowflake_app
  FROM APPLICATION PACKAGE hello_snowflake_package
  USING '@hello_snowflake_code.core.hello_snowflake_stage';
Copy
+---------------------------------------------------------+
| status                                                  |
|---------------------------------------------------------|
| Application 'hello_snowflake_app' created successfully. |
+---------------------------------------------------------+