Snowflake Compute Integration

Connecting Snowflake to ADOC lets you monitor and optimize the performance and cost of your Snowflake compute resources. Once connected, ADOC can:

  • Track credit consumption to improve cost efficiency.

  • Provide automated alerts and diagnostics for query performance and compute utilization.

This page covers Compute Observability setup only. If you're also enabling Data Reliability Monitoring for Snowflake — crawling, query analysis, schema drift, or data quality checks — see the separate Snowflake Reliability integration page for that setup. The two capabilities are configured independently, and this page doesn't cover Data Reliability fields.

Prerequisites

Set up Snowflake so ADOC can securely monitor compute activity, with a dedicated user and role scoped to only what's needed. Run every step below from the Snowflake Web UI or a SQL editor (SnowSQL or a Snowflake IDE), using an account with ACCOUNTADMIN privileges.

You'll create:

Role/User

Purpose

AD_COMPUTE_MONITOR

The role granting access to monitor Snowflake credit and performance data.

AD_USER

The user ADOC authenticates as for compute observability and cost tracking.

Core setup

Run the following as ACCOUNTADMIN. This creates the monitoring warehouse, role, and user, and grants the role access to the views and privileges ADOC needs — including CREATE STAGE, which lets ADOC create and manage its own stage under this role. You don't create or own the stage yourself; ADOC handles that automatically once the role has this privilege.

-- Define variables for reuse across the setup SET acceldata_role = 'AD_COMPUTE_MONITOR'; SET acceldata_warehouse = 'AD_COMPUTE_WH'; SET acceldata_user = 'AD_USER'; SET acceldata_password = '<your_secure_password>'; SET acceldata_database = 'AD_MONITOR_DB'; USE ROLE ACCOUNTADMIN; -- Dedicated, low-cost warehouse for ADOC's metadata queries, isolated from production workloads CREATE OR REPLACE WAREHOUSE IDENTIFIER($acceldata_warehouse) WAREHOUSE_SIZE = 'X-Small'; ALTER WAREHOUSE IDENTIFIER($acceldata_warehouse) SET AUTO_SUSPEND = 30; -- Role scoped specifically to monitoring, for least-privileged access and easier auditing CREATE OR REPLACE ROLE IDENTIFIER($acceldata_role); -- Access to Snowflake's Account Usage schema (QUERY_HISTORY, WAREHOUSE_METERING_HISTORY, and similar views) GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE IDENTIFIER($acceldata_role); -- Credit usage, performance stats, query behavior, and warehouse efficiency GRANT MONITOR ON ACCOUNT TO ROLE IDENTIFIER($acceldata_role); GRANT USAGE ON WAREHOUSE IDENTIFIER($acceldata_warehouse) TO ROLE IDENTIFIER($acceldata_role); -- User ADOC authenticates as, defaulting to the monitoring role, warehouse, and namespace CREATE OR REPLACE USER IDENTIFIER($acceldata_user) LOGIN_NAME = $acceldata_user PASSWORD = $acceldata_password DEFAULT_WAREHOUSE = $acceldata_warehouse DEFAULT_ROLE = $acceldata_role DEFAULT_NAMESPACE = SNOWFLAKE.ACCOUNT_USAGE; GRANT ROLE IDENTIFIER($acceldata_role) TO USER IDENTIFIER($acceldata_user); -- Monitoring database and schema-level access ADOC needs to manage stages, file formats, and metadata CREATE DATABASE IF NOT EXISTS IDENTIFIER($acceldata_database); GRANT USAGE ON DATABASE IDENTIFIER($acceldata_database) TO ROLE IDENTIFIER($acceldata_role); USE DATABASE IDENTIFIER($acceldata_database); GRANT MONITOR, USAGE, CREATE FILE FORMAT, CREATE STAGE ON SCHEMA PUBLIC TO ROLE IDENTIFIER($acceldata_role); -- Extends monitoring access to every current and future warehouse and resource monitor CREATE OR REPLACE PROCEDURE grant_privileges_to_all_warehouses(ROLE_NAME VARCHAR) RETURNS VARCHAR LANGUAGE JAVASCRIPT AS $$ var warehouses = snowflake.createStatement({sqlText: "SHOW WAREHOUSES"}).execute(); while (warehouses.next()) { var warehouse_name = warehouses.getColumnValue(1); snowflake.createStatement({sqlText: "GRANT MONITOR ON WAREHOUSE " + warehouse_name + " TO ROLE " + ROLE_NAME}).execute(); } var resource_monitors = snowflake.createStatement({sqlText: "SHOW RESOURCE MONITORS IN ACCOUNT"}).execute(); while (resource_monitors.next()) { var monitor_name = resource_monitors.getColumnValue(1); snowflake.createStatement({sqlText: "GRANT MONITOR ON RESOURCE MONITOR " + monitor_name + " TO ROLE " + ROLE_NAME}).execute(); } return 'Granted monitor privileges'; $$; GRANT USAGE ON PROCEDURE grant_privileges_to_all_warehouses(VARCHAR) TO ROLE IDENTIFIER($acceldata_role); CALL GRANT_PRIVILEGES_TO_ALL_WAREHOUSES($acceldata_role);

If you're reusing an existing user instead of creating AD_USER, update its defaults instead:

ALTER USER <existing_username> SET DEFAULT_ROLE = <your_role>, DEFAULT_WAREHOUSE = <your_wh>, DEFAULT_NAMESPACE = SNOWFLAKE.ACCOUNT_USAGE;

To change the role assigned to an existing user later:

GRANT ROLE <role> TO USER <user>; ALTER USER <user> SET DEFAULT_ROLE = <role>;

Choosing how ADOC authenticates to the stage

ADOC creates and manages its own Snowflake stage automatically as part of Compute Observability — you don't create or provision this stage yourself. What you do choose is how ADOC authenticates to the underlying cloud storage for that stage:

Storage Integration

How it authenticates

Where credentials live

Off (default)

Static AWS access keys embedded directly in the stage definition.

Stored in your Snowflake account.

On (recommended)

ADOC assumes an IAM role via AWS STS, using short-lived, automatically-rotated credentials.

Nothing is stored in your Snowflake account.

Turning on Storage Integration is optional, but recommended for tighter security — it avoids storing any long-lived credentials in Snowflake. If you plan to enable it, grant the role permission to create the integration:

GRANT CREATE INTEGRATION ON ACCOUNT TO ROLE IDENTIFIER($acceldata_role);

You'll configure the Storage Integration toggle itself later, in Step 3 below.

Enabling org-wide monitoring (optional)

To monitor usage across every account in your Snowflake organization instead of a single account, enable the ORGADMIN role. This grants access to the ORGANIZATION_USAGE schema for consolidated, org-wide monitoring.

USE ROLE ORGADMIN; ALTER ACCOUNT <your_account_identifier> SET IS_ORG_ADMIN = TRUE;

Add Snowflake as a data source

  1. Navigate to the left main navigation menu, select Control Center > Integrations.

  2. On the Integrations page, select Add Data Source, then Snowflake.

  3. On the Basic Details page:

    1. Enter a name for this data source.

    2. (Optional) Add a description.

    3. Choose your Data Plane, or select Setup Data Plane to create one.

    4. Enable Compute Observability. (You can also enable Data Reliability Monitoring here if needed — see the Snowflake Reliability page for that configuration.)

  4. Select Next.

  1. Enter the Snowflake URL (for example, https://<account>.snowflakecomputing.com).

  2. Provide the Snowflake credentials: Username, Password, and Role (for example, AD_COMPUTE_MONITOR).

  3. (Optional) Enable OAuth: toggle Enable OAuth and provide the Authorization Endpoint, Token Endpoint, Client ID, Client Secret, and optionally PKCE.

  4. Select Test Connection. A "Connected" message confirms success; otherwise, recheck the credentials and role.

  5. Select Next.

Step 3: Set up Compute Observability

Fill in the following:

Field

What to enter

Warehouse

One or more Snowflake warehouses to monitor.

Database

The monitoring database name (default: AD_MONITOR_DB).

Cost per Credit

Your cost per Snowflake credit (for example, 2.5).

Query Cost Type

Acceldata Attributed Query Cost, or Snowflake Attributed Query Cost.

Snowflake Fetch Past Data

The historical range to backfill (15 days to 1 year).

Polling Schedule

Time and time zone for scheduled polling.

Storage Integration

On or off — see Choosing how ADOC authenticates to the stage above.

These settings let ADOC compute credit usage and query-level metrics from Snowflake, giving you visibility into workload cost and efficiency.

Select Submit. A new Snowflake card appears on the Data Sources page with connection details.

Optimizing data partitioning

To tune performance for large datasets, adjust Snowflake's default parallelism using this environment variable in your ADOC Data Plane configuration:

SNOWFLAKE_PARTITION_SIZE_IN_MB=10

Field

Description

Default Snowflake Partition

100 MB

ADOC Default

2000 MB

Use Case

Lower the value to increase parallelism for large datasets. Smaller partitions mean higher concurrency and faster processing.

Setting up PrivateLink (optional)

Connect Snowflake to ADOC over AWS PrivateLink for a private network path instead of the public internet — improving isolation, security, and latency.

Prerequisites: an AWS account with the necessary permissions, a VPC in us-west-2, and a ready Snowflake account.

Step 1: Authorize PrivateLink access

Share your AWS account ID with the Acceldata support team, who will authorize it for PrivateLink connectivity. This is a one-time setup per AWS account.

Step 2: Create VPC endpoints

In the AWS Management Console, navigate to VPC > Endpoints > Create Endpoint, and create both of the following (region must be us-west-2):

Service Name

Endpoint

ADOC Control Plane

com.amazonaws.vpce.us-west-2.vpce-svc-091c001843d33bbaa

Secure Relay

com.amazonaws.vpce.us-west-2.vpce-svc-02830f09899d40f01

Step 3: Configure DNS using Route 53

In Amazon Route 53, navigate to Hosted Zones for your domain and add these A records:

Record Name

Type

Value

<tenant>.acceldata.app

A

The IP address of the ADOC Control Plane VPC endpoint. Replace <tenant> with your tenant subdomain.

dataplane.acceldata.app

A

The IP address of the Secure Relay VPC endpoint.

Use least-privileged IAM roles when creating and attaching these endpoints.

Troubleshooting

Issue

Possible cause

Resolution

Stage creation fails

The role lacks the CREATE STAGE privilege on the monitoring schema, or (with Storage Integration enabled) lacks USAGE on the storage integration object.

Confirm the GRANT ... CREATE STAGE statement from setup completed successfully, and that the role has USAGE on any storage integration you created.

OAuth fails

The user's default role or namespace isn't set, or the user has the ACCOUNTADMIN role.

Ensure the Snowflake user used for OAuth doesn't have the ACCOUNTADMIN role, and re-authenticate via ADOC.

Connection test fails

Invalid credentials, missing grants, or an incorrect role.

Double-check the Snowflake URL, credentials, warehouse, and role permissions.

What's next

After connecting Snowflake Compute in ADOC:

  • Visit Snowflake Costs and Snowflake Performance to view warehouse performance, credit usage trends, and query execution metrics.

  • Set up monitors for spikes in compute usage, query slowdowns, or unusual activity.

  • Use Snowflake Warehouse to get sizing and scheduling recommendations based on usage patterns.