Warehouses
Snowflake
ACCOUNT_USAGE gives a year of query, copy and task history — including rows loaded and rows rejected.
Snowflake has the best retrospective metadata of any platform here.
SNOWFLAKE.ACCOUNT_USAGE retains up to 365 days of query history, copy history and
task history, which means an investigation into something that happened three months ago is
actually possible — a sentence that is false almost everywhere else.
COPY_HISTORY is the standout for ETL specifically: it records
ROW_COUNT, ROW_PARSED and ERROR_COUNT per file per
load, which is a file-level reconciliation recorded automatically.
What Decim reads from Snowflake
Every item below is read-only, and each is a specific view, endpoint or file rather than a category of access. If something here is unacceptable in your environment, it can be removed from the query catalogue — see the agent for how that works.
| What | From | Why it matters |
|---|---|---|
| Query history | ACCOUNT_USAGE.QUERY_HISTORY | Statement text, duration, rows produced, warehouse and user |
| Load history | ACCOUNT_USAGE.COPY_HISTORY | Per-file rows parsed, loaded and errored |
| Task runs | ACCOUNT_USAGE.TASK_HISTORY | Scheduled task outcomes and their dependency graph |
| Object access | ACCOUNT_USAGE.ACCESS_HISTORY | Which query read and wrote which object — lineage |
| Table metadata | ACCOUNT_USAGE.TABLES | Row counts and bytes, refreshed periodically |
| Pipe activity | ACCOUNT_USAGE.PIPE_USAGE_HISTORY | Snowpipe ingestion volumes |
| Dynamic tables | INFORMATION_SCHEMA.DYNAMIC_TABLE_REFRESH_HISTORY | Refresh outcomes and lag |
Permissions required
Written out in full, because "read-only access" is not a specification. Nothing below grants the ability to write, and row access is requested only on the specific tables you name.
CREATE ROLE decim_agent;
-- ACCOUNT_USAGE is the shared database of account metadata.
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE decim_agent;
-- A small warehouse for the agent's own queries, so its usage is
-- attributable and separately capped.
CREATE WAREHOUSE decim_wh WITH WAREHOUSE_SIZE = 'XSMALL'
AUTO_SUSPEND = 60 AUTO_RESUME = TRUE;
GRANT USAGE ON WAREHOUSE decim_wh TO ROLE decim_agent;
-- Reconciliation tables only.
GRANT USAGE ON DATABASE sales TO ROLE decim_agent;
GRANT USAGE ON SCHEMA sales.public TO ROLE decim_agent;
GRANT SELECT ON TABLE sales.public.rejected_transactions TO ROLE decim_agent;
CREATE USER decim_agent DEFAULT_ROLE = decim_agent
DEFAULT_WAREHOUSE = decim_wh;
GRANT ROLE decim_agent TO USER decim_agent; What it builds
What this source contributes to the pipeline topology and to the evidence available during an investigation:
- Object-level lineage from ACCESS_HISTORY, covering ad-hoc work as well as scheduled
- File-level load reconciliation from COPY_HISTORY
- Task dependency graphs and their run outcomes
- Up to a year of history, which makes slow-burn investigations viable
Nodes learned from a definition are marked declared; nodes observed running are marked observed; nodes both declared and observed are verified. Where two sources disagree, the disagreement is recorded as a drift note rather than resolved silently.
Failure modes it surfaces
What this source is uniquely good at proving — and, just as usefully, at disproving. An investigation that can refute a hypothesis cheaply is worth as much as one that confirms it.
| Failure mode | The signal |
|---|---|
| Rows rejected during load | ERROR_COUNT non-zero with ON_ERROR = CONTINUE |
| File loaded twice | Same file name appearing twice in COPY_HISTORY |
| Task chain stopped | A root task suspended, so no downstream task runs |
| Ad-hoc write to production | ACCESS_HISTORY write with no corresponding task |
Limits
What this integration cannot tell you. Stated because an investigation that overstates its sources produces confident wrong answers, which is worse than an honest blocked.
ACCOUNT_USAGE.TABLES.ROW_COUNTis refreshed periodically and is not transactionally accurate- ACCESS_HISTORY requires Enterprise Edition or above
- The agent's own queries consume credits — hence the separate, small, auto-suspending warehouse
Related integrations
- dbt — manifest.json is the model graph; run_results.json is what actually happened. Both are artefacts, not APIs.
- Fivetran — Sync history and schema change events via API, plus the _fivetran_synced column in every target.
- BigQuery — INFORMATION_SCHEMA.JOBS gives every statement, its referenced tables and its output row count.
- ClickHouse — system.query_log carries read_rows and written_rows per statement; system.parts carries real write activity.
See all integrations, or how the sources are combined into one graph.
Get started
Investigating a Snowflake pipeline?
Bring an incident you already know the answer to. If Decim gets it wrong, that is a more useful demo than one where it doesn't.