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:
Note
开发应用程序是一个迭代过程。根据应用程序和环境的需求,您可能需要多次执行这些任务,或以不同顺序执行。
-
设置开发环境。
To develop a Snowflake Native App, you need to set up your development environment. This includes:
-
Install the Snowflake CLI. See Set up the Snowflake CLI to develop an app.
-
创建一个暂存区,用于上传应用程序文件。
Note
If you are using Snowflake CLI you do not need to create a stage manually because Snowflake CLI automatically creates a temporary stage to upload your application files during development.
For information on creating a stage using SQL, see CREATE STAGE. For information on creating a stage using Snowsight, see Staging files using Snowsight.
-
应用程序包是封装应用程序所需的数据内容、应用程序逻辑、元数据和设置脚本的容器。
- Create the setup script for your app.
安装脚本包含 SQL 语句,这些语句定义了使用者安装应用程序时将创建的组件。
- Create the manifest file for your app.
清单文件定义应用程序所需的配置和安装属性,包括安装脚本的位置及其版本信息。
- 将应用程序文件上传到暂存区。
您的应用程序所需的设置脚本、清单文件和其他资源必须上传到指定的暂存区,以便在开发应用程序时可以使用这些文件。
-
为应用程序添加版本和补丁。
See About release channels, versions, and patches for more information.
-
向您的应用程序添加共享数据内容。
You can securely share your data content with consumers as part of your app. For more information, see Share data content in a Snowflake Native App
-
向您的应用程序添加功能。
您可以向应用程序添加各种功能以提供额外的功能,包括以下内容:
- Add application logic to an application package
- Extending Snowflake with Functions and Procedures.
- Snowpark API.
- Introduction to external functions.
要对应用程序进行故障排除,您可以设置日志记录和事件处理。使用者可以在自己的账户中设置日志记录和事件处理,并与提供商共享。
- 为您的应用程序设置发布指令。
A release directive determines which version and patch level are available to consumers. You can set the release directive for each release channel of your application package. For more information, see Set the release directive using a release channel.
- 测试您的应用程序。
You can test an app in your account before publishing it to consumers. For more information, see Install and test an app locally.
Snowflake provides development mode and debug mode to test different aspects of your app.
在将应用程序共享给组织外部的使用者之前,必须先通过自动安全扫描,以确保应用程序安全可靠。
发布工作流程
完成应用程序的开发和测试后,提供商可以将其发布,以便与使用者共享。
成为提供商后,您可以创建和管理列表,以便与使用者共享应用程序。
-
创建列表。
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 Submit a listing for approval
-
发布列表。
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.
-
Becoming a Snowflake consumer allows you to access listings shared privately or on the Snowflake Marketplace. You can also access data shared as part of direct shares or data exchanges, which offer more limited data sharing capabilities.
使用者可以从列表中安装应用程序。
某些应用程序可能会要求使用者授予应用程序全局权限和对象级权限。
提供商可以配置应用程序,以输出日志和事件数据。使用者可以上设置事件表,以便与提供商共享这些数据。日志和事件数据在排查应用程序问题时非常有用。
安装并配置应用程序后,使用者可以执行其他操作来使用和监控该应用程序。