Install a Declarative Native App

Snowflake Declarative Native Apps are databases that you can use to gain access to data and functionality shared by Snowflake data providers.

You can use Snowsight to install and access Declarative Native Apps, or you can use SQL commands to access the data directly.

安装应用程序后,您可以将其与组织内的其他成员共享。

安全

Declarative Native Apps have a similar security model to secure data sharing:

  • 应用程序只能访问其包含的数据。

  • 应用程序无法访问使用者的私有数据。

  • 不允许应用程序进行外部调用或访问 Snowflake 账户外部的数据。

先决条件

To install a Declarative Native App, you must have a Snowflake account, and a role with either of the following privileges:

  • ACCOUNTADMIN 角色。

  • 同时具有 CREATE APPLICATIONIMPORT LISTING 权限的角色

要购买付费列表,该角色还必须具有 PURCHASE DATA EXCHANGE LISTING 权限。

授予安装权限

An ACCOUNTADMIN can allow members of the organization to install Declarative Native Apps by granting privileges to the member's role, using the GRANT privileges TO ROLE commands:

GRANT CREATE APPLICATION ON ACCOUNT TO ROLE <role_name>;
GRANT IMPORT LISTING ON ACCOUNT TO ROLE <role_name>;
Copy

安装应用程序

Roles with installation privileges can install a Declarative Native App from the Snowflake Marketplace, or from a privately shared listing.

  1. Sign in to Snowsight.

  2. In the navigation menu, select Marketplace.

  3. 搜索或浏览您要访问的列表。

  4. 选择该列表,然后选择 GetBuy

  5. (可选)在 Application name 中输入名称。

  6. 选择 Get

  7. 选择 Open 以查看应用程序,或选择 Done 以完成。

安装应用程序的用户即为应用程序所有者。应用程序所有者和 ACCOUNTADMIN 有权访问应用程序中共享的所有对象,包括 Notebook、表、视图和其他对象。

共享应用程序访问权限

The app owner (or the ACCOUNTADMIN) can share access to the data and features in a Snowflake Declarative Native App to members of their organization by their organization role.

他们可以共享整个应用程序的访问权限,或者对于某些应用程序,他们可以共享对应用程序中部分数据和功能的访问权限,这部分权限由应用程序角色定义。

应用程序所有者将应用程序角色分配给其组织中的团队

共享对应用程序中所有数据和功能的访问权限

应用程序所有者可以使用以下命令共享对应用程序中所有数据和功能的访问权限:GRANT IMPORTED PRIVILEGES ON APPLICATION

在此示例中,应用程序所有者将应用程序 marketing_data_app 的权限导入到 team_admin_role 组织角色:

GRANT IMPORTED PRIVILEGES ON APPLICATION marketing_data_app TO ROLE team_admin_role;
Copy

备注

共享应用程序访问权限并不会共享将应用程序权限授予他人的能力。

应用程序角色:共享对应用程序中部分数据和功能的访问权限

Some Declarative Native Apps include app roles, which provide access to a subset of the data and features in an app. App owners can assign app roles to their organization roles. This grants members of the organization roles access to the data and features defined in the app roles.

  1. 使用以下命令列出可用的角色:SHOW APPLICATION ROLES。例如:

    SHOW APPLICATION ROLES IN APPLICATION marketing_data_app;
    
    Copy

    该命令会列出可用的应用程序角色。如果应用程序没有应用程序角色,该命令将返回空结果集。

  2. 使用 GRANT APPLICATION ROLE ...TO ROLE 命令,根据组织角色将应用程序角色授予团队。

    GRANT APPLICATION ROLE marketing_data_app.sales TO ROLE sales_team_west;
    
    Copy

注意事项:

  • 使用者不能共享对应用程序中单个对象(例如单个表、视图或笔记本)的访问权限,除非由应用程序角色定义。

  • 使用者不能定义新的应用程序角色,或修改现有的应用程序角色。

  • 使用者不能与组织外部的成员共享应用程序中对象的访问权限。

访问应用程序

有关使用该应用程序的信息,请参阅 Access content in a Declarative Native App

语言: 中文