Read-only SQL across your databases, plus query history and telemetry.Your agent can inspect the current setup, prepare the connection and test access. You choose the account and resource scope, approve provider consent when needed, and authorize any required grants.
Connect Snowflake so Struct Agent can run read-only queries and inspect the permitted query history and telemetry. Verify the intended account, role and data scope.Use the catalog’s current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.An authorized operator runs the generated provider commands after checking the account and scope. Printing them does not apply grants. Preserve generated identifiers (such as an AWS External ID or Snowflake key-pair ID), then run the returned connection command with the real values.Each connection needs its own service user. The generated setup SQL includes only the public key; Struct keeps the private key. Run all setup statements with an authorized Snowflake admin, then use the printed Inspect
Replace the values in angle brackets.Permission catalog version
Inspect access and existing connections
Use a claimed workspace with permission to configure connections.Connect with the CLI
Print the setup material first:sfk_… key-pair ID within 24 hours. If a grant is missing, apply it and retry with the same key pair.For rotation, struct connections rotate CONNECTION_ID --print-commands creates a new public key for the unused key slot. Apply that SQL, then run struct connections rotate CONNECTION_ID --key-pair KEY_PAIR_ID. Verify the old fingerprint before removing its key slot. Preserve the user’s other key.Verify and recover
Use the returned connection ID:ok, health and missing permissions, not only the exit code. struct connections grant-command CONNECTION_ID prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.What Struct reads
- Event tables. Logs, traces, and metrics from stored procedures, UDFs, Snowpark, tasks, and dynamic tables.
- Query history. Failed loads, pipeline errors, and slow queries from the last 7 days.
- Read-only SQL against the tables you grant.
Permissions
The service user’s role needs SNOWFLAKE.EVENTS_VIEWER, USAGE on one warehouse, and SELECT on the databases Struct should read. MONITOR on that warehouse lets Struct see queries other users ran on it; the setup SQL grants it too.Read-only queries and telemetry
Read event-table logs, traces and metrics, query history, and the tables you grant.Other users’ query history
Only needed to see queries that other users and roles ran on the warehouse. Without it,INFORMATION_SCHEMA.QUERY_HISTORY returns only the service user’s own queries.- The setup SQL Struct generates grants SELECT across your current standard databases. If you create a database later, re-run its
EXECUTE IMMEDIATEblock, or grant it on its own with the commands below.
How to grant
Grant one database
Grant one database
2026-11-04.1. See permission changes.