Snowflake connector pulls audit logs from the snowflake database, account_usgae schema from various default audit views provided by snowflake.
Pre-requisites
You will need the following:
- A valid Snowflake account with the following credentials
- Username
- Password
- Account Name
- Read snowflake database privileges
Granting privileges
By default, you’re logged in using the SYSADMIN role. However, to view and change account information, you need to switch to the ACCOUNTADMIN role, which is the super admin role.
- Navigate to databases tab
- Click on the snowflake database (Not on the database name), a grant privileges drawer will open.
- Grant imported privileges to sysadmin role.
How to get account name?
-
You’ll have a unique URL with your account name in it to access your Snowflake environment:
-
You can get the account name with the help of the following example. Example: <account_name>.snowflakecomputing.com
Configurations
The following are the configurations to forward Snowflake Connector audit logs to DNIF.
Field | Description |
Connector Name | Enter a name for the cField Description Connector Name Enter a name for the connector Connector Type Enter Snowflake Connector Snowflake Username Enter the name of the Snowflake user Snowflake User Password Enter the password for Snowflake user Snowflake Account Name Enter the account name for Snowflake Database views Select the database views you want to get audit logs for. By default, QUERY_HISTORY, SESSIONS and LOGIN_HISTORY are selected, Views can be selected from the provided list; ACCESS_HISTORY AUTOMATIC_CLUSTERING_HISTORY COPY_HISTORY DATABASE_STORAGE_USAGE_HISTORY DATA_TRANSFER_HISTORY LOAD_HISTORY LOGIN_HISTORY MATERIALIZED_VIEW_REFRESH_HISTORY METERING_DAILY_HISTORY METERING_HISTORY PIPE_USAGE_HISTORY QUERY_HISTORY REPLICATION_USAGE_HISTORY SEARCH_OPTIMIZATION_HISTORY SESSIONS STAGE_STORAGE_USAGE_HISTORY STORAGE_USAGE TASK_HISTORY WAREHOUSE_EVENTS_HISTORY WAREHOUSE_LOAD_HISTORY WAREHOUSE_METERING_HISTORY onnector |
Connector Type | Enter Snowflake Connector |
Snowflake Username | Enter the name of the Snowflake user |
Snowflake User Password | Enter the password for Snowflake user |
Snowflake Account Name | Enter the account name for Snowflake |
Database views | Select the database views you want to get audit logs for. By default, QUERY_HISTORY, SESSIONS and LOGIN_HISTORY are selected, Views can be selected from the provided list;
|
-
Click Save after entering all the required details and click Test Connection, to test the configuration.
-
A Connection successful message will be displayed on screen along with the time stamp.
-
If the connection is not successful an error message will be displayed. Refer Troubleshooting Connector Validations for more details on the error message.
Once the connector is configured, validate if the connector is listed under Collection Status screen with status as Active. This signifies the connector is configured successfully and data is ready to ingest.