Set up Openflow - Snowflake Deployment: Create Snowflake role¶
|OFSFSPCS|를 사용하려면 배포가 아닌 특정 런타임과 관련된 여러 리소스를 만들어야 합니다. 일반적으로 이러한 리소스에는 다음이 포함됩니다.
Creation of Runtime specific Snowflake role
런타임 특정 네트워크 규칙 및 EAI(외부 액세스 통합) 생성
이 항목에서는 이러한 리소스를 만드는 방법에 대해 설명합니다.
Create a Snowflake Role and associated privileges to write data to Snowflake Role for Runtimes on Snowflake Deployment Section
Associate Snowflake Role. See Snowflake Role for Runtimes in the Snowflake Deployment Section.
외부 액세스 통합을 만들고 런타임에 연결합니다. :ref:`외부 액세스 통합 만들기<label-create_network_rules_and_external_access_integrations>`를 참조하세요.
SPCS 송신을 사용하여 비공개 시스템에 연결하려면 아웃바운드 PrivateLink 연결이 필요합니다.
Create a Snowflake role¶
When creating and editing Openflow Runtimes, Runtime Owners will have the ability to associate a role with the Runtime. This role will be used for flows that execute within the Runtime. For more information about Snowflake Roles, see What is a Snowflake role?.
참고
As OPENFLOW_ADMIN, you’ll create the Snowflake role and grant it to OPENFLOW_ADMIN, so that users granted that role are authorized to set this role on the Runtime.
Creating a Snowflake role is a prerequisite for creating a Runtime and involves the following steps:
자체 역할 만들기
런타임에서 사용하는 웨어하우스에 대한 액세스 권한을 해당 역할에 부여합니다.
런타임에서 사용하는 Snowflake 오브젝트에 대한 액세스 권한을 해당 역할에 부여합니다.
런타임에서 사용하는 외부 액세스 통합에 대한 액세스 권한을 해당 역할에 부여합니다.
To create a Snowflake role:
Create the required Snowflake role.
참고
``<RUNTIMENAME>``는 연결된 런타임의 이름을 나타냅니다.
USE ROLE OPENFLOW_ADMIN; CREATE ROLE IF NOT EXISTS OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>; GRANT ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME> TO ROLE OPENFLOW_ADMIN;
Allow the Snowflake role to use an existing warehouse that you are planning to use for data ingestion. Use this warehouse later when configuring your connectors for runtimes where you will be using this Snowflake role.
GRANT USAGE, OPERATE ON WAREHOUSE <OPENFLOW_INGEST_WAREHOUSE> TO ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>;
Allow the Snowflake role to use, create or otherwise access Snowflake objects.
참고
생성되는 Openflow 커넥터에 따라 필요한 기본 오브젝트가 달라집니다. 아래 예는 설명 목적으로만 제공됩니다.
GRANT USAGE ON DATABASE <OPENFLOW_SPCS_DATABASE> TO ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>; GRANT USAGE ON SCHEMA <OPENFLOW_SPCS_SCHEMA> TO ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIMENAME>;
네트워크 규칙 및 외부 액세스 통합 만들기¶
Snowflake의 보안 모델은 :doc:`네트워크 정책</user-guide/network-policies>`을 사용하여 Snowflake 외부의 특정 엔드포인트 및 시스템에 대한 보안 액세스를 지원합니다.
네트워크 정책의 두 가지 주요 측면은 네트워크 규칙 및 :doc:`EAI(외부 액세스 통합)</developer-guide/external-network-access/external-network-access-overview>`입니다. 각각은 런타임에 필요한 외부 리소스에 대한 보안 액세스를 제공하는 데 사용됩니다.
네트워크 규칙 및 외부 액세스 통합을 만드는 데 필요한 세 가지 단계가 있습니다.
네트워크 규칙을 만들어 네트워크 식별자를 논리 영역으로 그룹화합니다.
Create the external access integration (EAI), specifying the list of network rules and assuring the Snowflake Role has USAGE on the EAI.
런타임을 만들 때 Openflow UI에서 EAI를 런타임에 연결합니다.
필요한 네트워크 규칙과 EAI를 만들려면 다음 단계를 수행합니다.
참고
이 예에서는 RUNTIME_NAME을 생성 중인 런타임 이름의 자리 표시자로 사용합니다.
적절한 네트워크 규칙을 만듭니다. 자세한 내용은 CREATE NETWORK RULE 섹션을 참조하십시오.
참고
``<OPENFLOW_DATABASE>``는 네트워크 규칙을 포함할 데이터베이스의 이름을 나타냅니다. Snowflake는 Openflow와 관련된 네트워크 규칙 및 외부 액세스 통합을 위한 특정 데이터베이스를 만들 것을 제안합니다.
USE DATABASE <OPENFLOW_DATABASE>; CREATE OR REPLACE NETWORK RULE OPENFLOW_<RUNTIME_NAME>_NETWORK_RULE MODE = EGRESS TYPE = HOST_PORT VALUE_LIST = ('comma separated list of host:port pairs');
연결된 외부 통합을 만듭니다. 자세한 내용은 CREATE EXTERNAL ACCESS INTEGRATION 섹션을 참조하십시오.
USE ROLE ACCOUNTADMIN; CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION OPENFLOW_<RUNTIME>_EAI ALLOWED_NETWORK_RULES = (OPENFLOW_<RUNTIME_NAME>_NETWORK_RULE) ENABLED = TRUE;
Grant access to the EAI to the previously created Snowflake role.
GRANT USAGE ON INTEGRATION OPENFLOW_<RUNTIME_NAME>_EAI TO ROLE OPENFLOW_RUNTIME_ROLE_<RUNTIME_NAME>;