Snowflake High Performance connector for Kafka:Snowflakeの構成

このトピックでは、 Snowflake High Performance connector for Kafka のためにSnowflakeを構成する手順について説明します。

Snowflake recommends that you create a separate user, using CREATE USER and role using CREATE ROLE for each Kafka instance so that the access privileges can be individually revoked as required.

Kafkaコネクタを使用するロールの作成

The following creates a custom role for use by the Kafka connector, for example KAFKA_CONNECTOR_ROLE. The script references a specific existing database and schema (kafka_db.kafka_schema) and user (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;

-- Grant privileges on the database.
GRANT USAGE ON DATABASE kafka_db TO ROLE kafka_connector_role;

-- Grant privileges on the schema.
GRANT USAGE ON SCHEMA kafka_schema TO ROLE kafka_connector_role;

-- 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;

-- Grant INSERT on the table to insert data into.
GRANT INSERT ON TABLE kafka_schema.existing_table TO ROLE kafka_connector_role;

-- Grant the custom role to the user configured in the Kafka connector configuration properties.
GRANT ROLE kafka_connector_role TO USER kafka_connector_user;
Copy

どの権限も、コネクタで使用されるロールに直接付与すべきことに注意してください。付与はロール階層から継承することはできません。

カスタムロールとロール階層の作成の詳細については、 アクセス制御の構成 をご参照ください。

必要な権限

コネクタは、Snowflakeオブジェクトを作成および管理するために次の権限を必要とします。

オブジェクト

権限

必要に応じて

データベース

USAGE

常に必要

スキーマ

USAGE

常に必要

パイプ

OPERATE

ユーザー定義パイプを使用する場合

宛先テーブル

INSERT

常に必要

次のステップ

Kafkaを設定します