Snowflake High Performance connector for Kafka: Snowflake 구성하기¶
이 항목에서는 |KAFKAOFHP|용 Snowflake를 구성하는 단계에 대해 설명합니다.
Snowflake는 필요에 따라 액세스 권한을 개별적으로 취소할 수 있도록 각 Kafka 인스턴스에 대해 별도의 사용자(CREATE USER 사용) 및 역할(CREATE ROLE 사용)을 생성하는 것을 권장합니다. 역할은 사용자에 대한 기본 역할로 할당되어야 합니다.
Kafka 커넥터를 사용하기 위한 역할 생성하기¶
Kafka 커넥터(예: KAFKA_CONNECTOR_ROLE_1)에서 사용할 사용자 지정 역할을 생성하는 스크립트는 다음과 같습니다. 이 스크립트에서는 특정한 기존 데이터베이스 및 스키마(kafka_db.kafka_schema) 및 사용자(kafka_connector_user_1)를 참조합니다.
-- Use a role that can create and manage roles and privileges.
USE ROLE securityadmin;
-- Create a Snowflake role with the privileges to work with the connector.
CREATE ROLE kafka_connector_role_1;
-- Grant privileges on the database.
GRANT USAGE ON DATABASE kafka_db TO ROLE kafka_connector_role_1;
-- Grant privileges on the schema.
GRANT USAGE ON SCHEMA kafka_schema TO ROLE kafka_connector_role_1;
-- Grant OPERATE on pipes only if you manually created them (user-defined pipe mode).
-- GRANT OPERATE ON PIPE existing_pipe1 TO ROLE kafka_connector_role_1;
-- Grant INSERT on the table to insert data into.
GRANT INSERT ON TABLE kafka_schema.existing_table TO ROLE kafka_connector_role_1;
-- Grant the custom role to the user configured in the Kafka connector configuration properties.
GRANT ROLE kafka_connector_role_1 TO USER kafka_connector_user_1;
모든 권한은 커넥터가 사용하는 역할에 직접 부여되어야 합니다. 역할 계층에서 권한을 상속받을 수 없습니다.
사용자 지정 역할 및 역할 계층 구조 생성과 관련한 자세한 내용은 액세스 제어 구성하기 를 참조하십시오.
필수 권한¶
커넥터에 Snowflake 오브젝트를 생성하고 관리하려면 다음 권한이 필요합니다.
오브젝트 |
권한 |
필요한 경우 |
|---|---|---|
데이터베이스 |
USAGE |
항상 필수 |
스키마 |
USAGE |
항상 필수 |
파이프 |
OPERATE |
항상 필수 |
대상 테이블 |
INSERT |
항상 필수 |