Snowflake
Description
This destination can send logs, metrics, and traces to Snowflake, a cloud data warehouse service.
Supported Types
Logs | Metrics | Traces | BindPlane Agent |
---|---|---|---|
✓ | ✓ | ✓ | v1.45.0 + |
Prerequisites
- Snowflake data warehouse
- Snowflake user with appropriate privileges
The following guide will detail how to get a user initialized in Snowflake that can be used with this destination. It is meant to get telemetry flowing with limited time spent configuring. If you'd like to take an alternative approach, check out the exporter documentation on this topic here.
Snowflake has a variety of ways to connect to it, but these instructions will be tailored for "Classic Console" as all accounts have access to it.
Before starting, log in to Classic Console using a user that has access to the ACCOUNTADMIN
role or another role in you Snowflake account that has permission to grant privileges and create users. If the default role is not the required one, then you'll need to assume that role using this SQL command (replace the role as needed):
These instructions will grant privileges to one of the default roles Snowflake is initialized with, SYSADMIN
. If you want to grant privileges to a different role then just switch out SYSADMIN
for your role in the SQL commands.
1. Grant Warehouse Usage
First, we need to grant the USAGE
privilege to the SYSADMIN
role on the data warehouse telemetry data will be stored in. Run this SQL command next (replace TEST
with your warehouse name):
2. Grant Create Database Privilege
Next the SYSADMIN
role needs to be granted the ability to create databases in the Snowflake account. Run the following SQL to do so:
3. Create New User For BindPlane
Now a new user needs to be created that the BindPlane Agent can login as. The user should also have the default role assigned as SYSADMIN
, although it isn't necessary.
Note: If the default role is not assigned, then the exporter will need to be configured with the correct role to work.
Remember the login name and password you use and configure the destination with these values. Replace the user, password, and login name in the following SQL to match yours:
4. Grant Privilege to SYSADMIN Role
Even though the default role was set as SYSADMIN
we still need to grant the new account permission to it. This can be done using the next SQL command (replace user as needed):
Now we have a Snowflake user with the correct permissions to be able to create a database, schemas, and tables and also use the configured warehouse to store telemetry data in.
Configuration
Field | Description |
---|---|
Choose Telemetry Type | The kinds of telemetry to send to Snowflake. |
Account Identifier | The account identifier for the Snowflake account that data should be sent to. |
Warehouse | THe Snowflake warehouse that telemetry data should be stored in. |
Username | Username the exporter will use to authenticate with Snowflake. |
Password | Password the exporter will use to authenticate with Snowflake. |
Database | The Snowflake database that telemetry schemas will be stored in. Will be created if it doesn't exist. |
Log Schema | The schema that the log table will be stored in. Will be created if it doesn't exist. |
Log Table | The table that logs will be stored in. Will be created if it doesn't exist. |
Metric Schema | The schema that the metric tables will be stored in. Will be created if it doesn't exist. |
Metric Table | The prefix used for metric tables. Tables are created if they don't exist. See this exporter documentation for more. |
Trace Schema | The schema that the trace table will be stored in. Will be created if it doesn't exist. |
Trace Table | The table that traces will be stored in. Will be created if it doesn't exist. |
Role | The Snowflake role the exporter should use. Only required if the default role of the provided credentials does not have correct privileges. |
Parameters | Additional optional parameters the exporter should use when connecting to Snowflake. This option is generally not required. See this Snowflake documentation for more. |
This destination supports the following retry and queuing settings:
Sending Queue | Persistent Queue | Retry on Failure |
---|---|---|
✓ | ✓ | ✓ |
Example Configuration
Here we will configure this destination to send all telemetry types to a Snowflake account using the default values for database resources. We'll also configure the sending queue, persistent queue, and retry on failure.
Web Interface
Standalone Destination