Snowflake Native App Framework 工作流程¶
This topic describes the workflows for developing, publishing, and installing a Snowflake Native App.
开发工作流程¶
The following workflow outlines the general tasks for developing and testing Snowflake Native App:
备注
Developing an app is an iterative process. You might perform many of these tasks multiple times or in a different order depending on the requirements of your app and environment.
设置开发环境。
开发 Snowflake Native App 之前,您需要先搭建开发环境。其中包括:
安装 Snowflake CLI。请参阅 设置 Snowflake CLI 来开发应用程序。
创建一个暂存区,用于上传应用程序文件。
备注
如果您使用 Snowflake CLI,无需手动创建暂存区,因为 Snowflake CLI 会在开发过程中自动创建临时暂存区以上传应用程序文件。
有关使用 SQL 创建暂存区的信息,请参阅 CREATE STAGE。有关使用 Snowsight 创建暂存区的信息,请参阅 使用 Snowsight 暂存文件。
:doc:` 创建应用程序包 </developer-guide/native-apps/creating-app-package>`。
An application package is a container that encapsulates the data content, application logic, metadata, and setup script required by an app.
Create the setup script for your app.
The setup script contains the SQL statements that define the components created when a consumer installs your app.
Create the manifest file for your app.
The manifest file defines the configuration and setup properties required by the app, including the location of the setup script and versions.
Upload the application files to a stage.
The setup script, the manifest file, and other resources that your app requires must be uploaded to a named stage so that these files are available as you develop your app.
为应用程序添加版本和补丁。
See 关于发布通道、版本与补丁 for more information.
向您的应用程序添加共享数据内容。
You can securely share your data content with consumers as part of your app. For more information, see 在 Snowflake Native App 中共享数据内容
向您的应用程序添加功能。
您可以向应用程序添加各种功能以提供额外的功能,包括以下内容:
Set up logging and event handling to troubleshoot your app.
To troubleshoot an app, you can set up logging and event handling. Consumers can set up logging and event handling in their account and share them with providers.
Set the release directive for your app.
发布指令决定了哪个版本和补丁级别可供使用者使用。您可以为应用程序包的每个发布通道设置发布指令。有关更多信息,请参阅 使用发布通道设置发布指令。
测试您的应用程序。
您可以在自己的账户中测试应用程序,然后再将其发布给使用者。有关更多信息,请参阅 在本地安装和测试应用程序。
Snowflake provides development mode and debug mode to test different aspects of your app.
:doc:` 运行自动安全扫描 <security-overview>`。
Before you can share an app with consumers outside your organization, the app must pass an automated security scan to ensure that it is secure and stable.
发布工作流程¶
After developing and testing your app, providers can publish the app to share it with consumers.
-
Becoming a provider allows you to create and manage listings to share your app with consumers.
创建列表。
You can create a private listing or a Snowflake Marketplace listing to share your app with consumers. For more information, see Create a listing for an app.
提交列表以供审批。
Before you can publish a listing to the Snowflake Marketplace, you must submit the listing to Snowflake for approval. For more information, see 提交列表以供审批
发布列表。
After your listing is approved, you can publish the listing to make it available to consumers. For more information, see Publish a listing for an app.
使用者工作流程¶
Consumers can discover the app and install it from a listing. After installing the app, consumers can configure, use, and monitor the app. See Working with apps as a consumer.
-
成为 Snowflake 使用者后,您就可以访问私密共享的列表,或者在 Snowflake Marketplace 上共享的列表。您还可以访问作为直接共享或数据交换的一部分共享的数据,这提供较为有限的数据共享功能。
-
Consumers can install an app from a listing.
Grant the privileges required by the app.
Some apps might ask the consumer to grant global and object-level privileges to the app.
Enable logging and event sharing to troubleshoot the app.
A provider can set up an app to emit logging and event data. A consumer can set up an events table to share this data with providers. Logs and event data are useful when troubleshooting an app.
-
After installing and configuring the app, a consumer can perform additional tasks to use and monitor the app.