Skip to main content
The Query Profile Table is a small, dedicated table in your Snowflake account that records performance metrics for queries Elementum runs on your behalf. It’s part of the Snowflake CloudLink setup and is provisioned once, after the CloudLink itself is created.

What the Query Profile Table is

When you create a Snowflake CloudLink, Elementum generates a DDL script that creates a dynamic table in the ELEMENTUM_PLATFORM schema. That table is backed by SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY and a scheduled task that keeps it current. Once provisioned:
  • The table records execution time, warehouse usage, bytes scanned, and similar metrics only for queries the ELEMENTUM role runs.
  • It does not capture queries from your internal users, other applications, or third-party tools.
  • It lives entirely inside your Snowflake account—no data leaves Snowflake.
  • A scheduled task clears records older than 14 days, so the table stays small.
PropertyValue
LocationELEMENTUM.ELEMENTUM_PLATFORM schema in your Snowflake account
SourceFiltered view of SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
ScopeQueries executed by the ELEMENTUM role only
Retention14 days, enforced by a scheduled task
OwnerThe ELEMENTUM role
Elementum reads the Query Profile Table to surface query-performance metrics. Without it, every metric lookup has to scan SNOWFLAKE.ACCOUNT_USAGE directly, which is slow and consumes credits.

Why Elementum recommends provisioning it

The Query Profile Table gives Elementum’s support and engineering teams the visibility needed to diagnose performance issues in your environment, without granting access to anything beyond the queries Elementum itself ran.

Faster diagnosis of performance issues

When the table is provisioned, Elementum can diagnose and resolve issues directly rather than relying on support escalations and one-off ACCOUNT_USAGE queries. This applies to:
  • Timeouts and slow-running operations
  • Intermittent query failures
  • Warehouse scaling and credit-usage concerns

Proactive performance monitoring

With visibility into how operations perform over time, Elementum can:
  • Identify which operations are creating bottlenecks
  • Alert on emerging performance issues before they affect your workflows
  • Recommend configuration changes (such as warehouse sizing or scaling policy) when they would improve your experience

Targeted optimization for your environment

Using performance trends specific to your account, Elementum can recommend or apply targeted improvements such as:
  • Index recommendations
  • Search optimization
  • Clustering keys on tables Elementum queries frequently

Privacy and access scope

The table is designed so Elementum only ever sees activity it generated:
  • The DDL filters QUERY_HISTORY by the ELEMENTUM role, so other users’ queries are excluded.
  • The table is owned by the ELEMENTUM role and lives in the platform schema you already use for CloudLink. No additional access is granted outside that role.
  • Data older than 14 days is removed automatically by the scheduled task.
You control access through your existing Snowflake roles and grants. If you ever revoke the ELEMENTUM role’s privileges, the table and its task stop receiving data.

Prerequisites

Before provisioning the Query Profile Table, confirm:
  • The Snowflake CloudLink has been created and is showing as Connected in Organization Settings → CloudLinks. See Connect Snowflake to Elementum for the full setup.
  • You have a Snowflake user with the ACCOUNTADMIN role available to run the DDL.
  • The ELEMENTUM role, warehouse, database, and ELEMENTUM_PLATFORM schema created during CloudLink setup are in place.

Provision the table

Elementum generates the DDL for your specific CloudLink—it includes the right database, schema, warehouse, and role names for your environment.
1

Open the CloudLink details

In Elementum, go to Organization Settings → CloudLinks and click the name of your Snowflake CloudLink to open its details.
2

Copy the DDL

Scroll to the Query Profile Table section and click Copy DDL. The script is tailored to this CloudLink and includes the grants the ELEMENTUM role needs to read SNOWFLAKE.ACCOUNT_USAGE and run the scheduled task.
3

Run the DDL in Snowflake

Open a Snowflake worksheet as ACCOUNTADMIN and run the script.
The DDL must be run by ACCOUNTADMIN. It grants IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE and creates a scheduled task in ELEMENTUM_PLATFORM—both of which require account-level privileges.
4

Confirm the status updates

Return to the CloudLink dialog. The Query Profile Table status should change to Provisioned. If it still shows Not provisioned, see Troubleshooting below.

Verify the table is working

You can sanity-check the table and its scheduled task directly in Snowflake.
1

Confirm the table exists

USE ROLE ELEMENTUM;
USE DATABASE ELEMENTUM;
USE SCHEMA ELEMENTUM_PLATFORM;

SHOW DYNAMIC TABLES LIKE 'QUERY_PROFILE%';
You should see the dynamic table created by the DDL.
2

Confirm the scheduled task is running

SHOW TASKS LIKE 'QUERY_PROFILE%' IN SCHEMA ELEMENTUM.ELEMENTUM_PLATFORM;
The task state should be started. If it shows suspended, resume it:
USE ROLE ACCOUNTADMIN;
ALTER TASK ELEMENTUM.ELEMENTUM_PLATFORM.<TASK_NAME> RESUME;
3

Confirm rows are being recorded

Once the CloudLink has run a few queries (give it a few minutes after provisioning), the table should contain rows:
SELECT COUNT(*) FROM ELEMENTUM.ELEMENTUM_PLATFORM.<QUERY_PROFILE_TABLE>;
The exact table and task names are in the DDL Elementum generated for your CloudLink.

Troubleshooting

  • Re-run the DDL as ACCOUNTADMIN. The IMPORTED PRIVILEGES grant and task creation both require account-level privileges and will silently fail under other roles.
  • Confirm the CloudLink in the UI matches the one whose DDL you copied. Each CloudLink has its own DDL.
  • Click Refresh on the CloudLink details page; the status check runs against Snowflake on demand.
  • Verify you are running the script as ACCOUNTADMIN, not SYSADMIN or a custom admin role.
  • Confirm the ELEMENTUM role exists. If you set up the CloudLink before the role was created, the grants in the DDL will fail.
  • Check that the scheduled task is in the started state with SHOW TASKS.
  • Confirm the ELEMENTUM warehouse is not suspended; the task needs warehouse compute to run.
  • Allow up to the task’s scheduled interval (typically a few minutes) for the first rows to land.
  • Verify the CloudLink has actually executed queries since provisioning. The table only captures activity from the ELEMENTUM role.
If you need to remove the table—for example, before tearing down a CloudLink—drop the task first, then the table:
USE ROLE ACCOUNTADMIN;
ALTER TASK ELEMENTUM.ELEMENTUM_PLATFORM.<TASK_NAME> SUSPEND;
DROP TASK ELEMENTUM.ELEMENTUM_PLATFORM.<TASK_NAME>;
DROP DYNAMIC TABLE ELEMENTUM.ELEMENTUM_PLATFORM.<QUERY_PROFILE_TABLE>;
The CloudLink will continue to work without the table, but query-profile lookups will fall back to scanning ACCOUNT_USAGE directly.