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 table named ELEMENTUM_QUERY_PROFILE_V1_<CloudLink ID> in the ELEMENTUM_PLATFORM schema of the CloudLink’s database. A scheduled task adds new rows to that table from SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY. 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.
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 role that can run the DDL, typically ACCOUNTADMIN.
  • The ELEMENTUM role, warehouse, database, and ELEMENTUM_PLATFORM schema created during CloudLink setup are in place.
  • The role that runs the DDL has the two grants below.
Before you run the DDL, grant the role that runs the script these two privileges. The same statements appear as comments at the top of the script.
  • The first grant lets the role read SNOWFLAKE.ACCOUNT_USAGE, which the table is built from.
  • The second grant lets the scheduled task run. The task is owned by the role that runs the script.

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. It shows the provisioning status, the table name, and the SQL. This section has no copy button, so select the full SQL and copy it. The SQL is tailored to this CloudLink.
3

Run the DDL in Snowflake

Open a Snowflake worksheet as ACCOUNTADMIN and run the script.
The DDL must be run by a role that has the grants in Prerequisites, typically ACCOUNTADMIN. It creates a table and a scheduled task in ELEMENTUM_PLATFORM.
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

Replace <database> with your CloudLink’s database. You should see the table created by the DDL, named ELEMENTUM_QUERY_PROFILE_V1_<CloudLink ID>.
2

Confirm the scheduled task is running

The task state should be started. If it shows suspended, resume it:
3

Confirm rows are being recorded

The task runs hourly by default, so allow up to about 2 hours after provisioning for the first rows to appear. Once the CloudLink has run queries, the table should contain rows:
The exact table and task names are in the DDL Elementum generated for your CloudLink.

Troubleshooting

  • Confirm the two grants in Prerequisites were run for the role that runs the DDL, then re-run the DDL as that role (typically ACCOUNTADMIN).
  • 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 the role that has the grants in Prerequisites, typically 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 about 2 hours after provisioning for the first rows to appear. The task runs hourly by default.
  • 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:
The CloudLink will continue to work without the table, but query-profile lookups will fall back to scanning ACCOUNT_USAGE directly.