Supported Data Types
📘 Logs | 📈 Metrics | 🚦 TracesSnowflake Destination Configuration
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
| Name | none | true | Unique identifier within Sawmills. | |
| Account ID | String | none | true | The account identifier number of the Snowflake account to which telemetry data will be sent. |
| Username | String | none | true | The username for the account used by the Destination to authenticate with Snowflake. |
| Password | String | none | true | The password for the account used by the Destination to authenticate with Snowflake. |
| Role | String | none | false | The Snowflake role the exporter should use to obtain the correct permissions; specify this only if the user’s default role does not have the necessary permissions. |
| Data Warehouse | String | none | true | The Snowflake data warehouse that should be used for storing telemetry data. |
| Database Name | String | telemetry | false | The Snowflake database where the destination will store telemetry data; it will create the database if it doesn’t exist. |
| Schema Name | String | logs | false | Schema in which to store the log table. |
| Database Table | String | data | false | Table in which to store the log table. |
Prerequisites
- A Snowflake account with a database, warehouse, and user.
- A Sawmills Collector instance.
- Network connectivity between the source and destination clusters.
Snowflake Setup Script
The following SQL script creates the necessary user, role, and permissions in Snowflake. Each section performs specific setup tasks:- Variable Setup: Defines variables for all the configurable values needed in the script.
-
Role Creation:
- Switches to the
securityadminrole for security-related operations - Creates a new role for Sawmills if it doesn’t exist
- Grants the new role to
SYSADMINfor management purposes
- Switches to the
-
User Creation:
- Creates a new user account for Sawmills
- Sets the default role and warehouse for the user
- Associates the newly created role with the user
-
Permission Setup:
- Switches to
accountadminfor granting warehouse access - Grants warehouse usage permissions to the role
- Grants necessary database permissions (CREATE SCHEMA, MONITOR, USAGE) to the role
- Switches to
How to get the account ID:
- Login to your Snowflake account.
- Click on the user menu in the bottom-left corner and select Account.
- Hover over the Account you want to use and copy the Account Identifier.
- Replace the
.with-in the account identifier.