Snowflake High Performance connector for Kafka: Snowflake konfigurieren¶
Unter diesem Thema werden die Schritte zur Konfiguration von Snowflake für Snowflake High Performance connector for Kafka beschrieben.
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.
Erstellen einer Rolle zur Verwendung des Kafka-Konnektors¶
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;
Beachten Sie, dass alle Berechtigungen direkt der Rolle zugewiesen werden müssen, die der Konnektor verwendet. Berechtigungszuweisungen können nicht von der Rollenhierarchie geerbt werden.
Weitere Informationen zum Erstellen von benutzerdefinierten Rollen und Rollenhierarchien finden Sie unter Konfigurieren der Zugriffssteuerung.
Erforderliche Berechtigungen¶
Der Konnektor benötigt die folgenden Berechtigungen, um Snowflake-Objekte zu erstellen und zu verwalten:
Objekt |
Berechtigung |
Bei Bedarf |
|---|---|---|
Datenbank |
USAGE |
Immer erforderlich |
Schema |
USAGE |
Immer erforderlich |
Pipe |
OPERATE |
Bei Verwendung von benutzerdefinierten Pipes |
Zieltabelle |
INSERT |
Immer erforderlich |