If you’re managing large-scale datasets in a cloud data warehouse, you already know that Snowflake is a powerhouse for storage and processing. However, Snowflake isn’t built for the kind of high-frequency, aesthetic observability that developers need. That’s where Grafana comes in. In this connecting Grafana to Snowflake guide, I’ll walk you through the exact process I use to bridge these two tools to create high-performance dashboards.

I’ve found that many teams struggle with this setup not because of the software, but because of permission mismatches and warehouse configuration errors. By the end of this tutorial, you’ll have a live connection and a functioning visualization.

Prerequisites

Before we dive into the UI, make sure you have the following ready. If you’re still deciding on your stack, you might want to check out my comparison of Grafana vs Kibana for log visualization to ensure you’re using the right tool for the job.

Step 1: Configure Snowflake for Grafana

You should never use your primary ACCOUNTADMIN account for Grafana. In my experience, creating a dedicated service user is the only way to maintain a proper security posture and track credit consumption specifically for your dashboards.

Run the following SQL in a Snowflake worksheet:

-- 1. Create a dedicated role for Grafana
CREATE ROLE GRAFANA_ROLE;

-- 2. Create a dedicated warehouse (X-Small is usually enough for dashboards)
CREATE WAREHOUSE GRAFANA_WH 
  WAREHOUSE_SIZE = 'XSMALL' 
  AUTO_SUSPEND = 60 
  AUTO_RESUME = TRUE;

-- 3. Create the service user
CREATE USER GRAFANA_USER 
  PASSWORD = 'YourSecurePassword123!' 
  DEFAULT_ROLE = GRAFANA_ROLE 
  DEFAULT_WAREHOUSE = GRAFANA_WH;

-- 4. Assign role and permissions
GRANT ROLE GRAFANA_ROLE TO USER GRAFANA_USER;
GRANT USAGE ON WAREHOUSE GRAFANA_WH TO ROLE GRAFANA_ROLE;
GRANT USAGE ON DATABASE YOUR_DB TO ROLE GRAFANA_ROLE;
GRANT USAGE ON SCHEMA YOUR_DB.YOUR_SCHEMA TO ROLE GRAFANA_ROLE;
GRANT SELECT ON ALL TABLES IN SCHEMA YOUR_DB.YOUR_SCHEMA TO ROLE GRAFANA_ROLE;

Step 2: Add the Snowflake Data Source in Grafana

Now that the backend is ready, we need to tell Grafana how to talk to Snowflake. As shown in the image below, you’ll need to navigate to the Connections menu to begin.

1. Log into your Grafana instance. 2. Navigate to ConnectionsData Sources. 3. Click Add data source and search for Snowflake. 4. Fill in the following configuration fields:

Field Value/Example
Account xy12345.us-east-1 (Do not include .snowflakecomputing.com)
User GRAFANA_USER
Password The password you set in Step 1
Role GRAFANA_ROLE
Warehouse GRAFANA_WH

Click Save & Test. If you see a green checkmark, you’ve successfully completed the most difficult part of this connecting Grafana to Snowflake guide.

Grafana data source configuration screen for Snowflake showing required fields
Grafana data source configuration screen for Snowflake showing required fields

Step 3: Building Your First Visualization

With the connection established, you can now start querying. I recommend starting with a simple Table panel to verify data flow before moving to complex time-series graphs. For those looking to scale their observability, I highly suggest reading my real-time data visualization with Grafana tutorial.

In the query editor, you can use the visual builder, but for Snowflake, I always stick to raw SQL. Here is a basic example to track record growth over time:

SELECT
  $__timeFrom() as time,
  count(*) as total_records
FROM YOUR_DB.YOUR_SCHEMA.YOUR_TABLE
WHERE $__timeFilter(created_at)
GROUP BY 1

Pro Tip: Always use Grafana’s built-in macros like $__timeFilter(). This ensures that when you change the time range in the Grafana UI, Snowflake only scans the necessary partitions, saving you a massive amount in compute credits.

Pro Tips for Performance

Troubleshooting Common Issues

If you hit a wall, check these three common failure points:

  1. Invalid Account Format: This is the #1 error. Ensure you aren’t including https:// or .snowflakecomputing.com in the Account field. Only the organization and account ID (e.g., org-account).
  2. Warehouse Suspended: If queries timeout, ensure AUTO_RESUME = TRUE was set on your Grafana warehouse.
  3. Role Hierarchy: If you get a “Table not found” error, verify that GRAFANA_ROLE has USAGE permissions on both the Database AND the Schema.

What’s Next?

Now that you’ve mastered connecting Grafana to Snowflake, you can start implementing more advanced alerting. You can set up Grafana to ping your Slack channel the moment a Snowflake query detects an anomaly in your business metrics.

If you’re interested in further optimizing your dev workflow, explore more of my guides on automation and productivity tools.