# Snowflake export missing context: before and after | SourceX

Canonical: https://refer.sourcex.si/guides/data-break-to-repair-missing-context
Last updated: 2026-11-04

A Snowflake-only export keeps what ran and when: query text, start and end times, the user or role that ran it. It loses almost everything that explains a repair: which dbt test failed and how many rows it caught, the Jira ticket that diagnosed the cause, the commit that changed the model, the rerun that passed, and whether finance accepted the corrected number. Query history records execution. The reasoning that turns a rebuild into a repair lives in dbt artifacts, Jira and often a chat thread.

This before-and-after case is part of the [data-break-to-repair records guide](/guides/chain-data-break-to-repair). To describe the same chain for an introduction, use the [metadata packet](/resources/data-break-to-repair-metadata-packet); to judge how complete it is, use the [completeness scorecard](/resources/data-break-to-repair-completeness-checklist).

## Before: the incident as Snowflake query history shows it

Illustrative. A fictional 290-person subscription software company runs dbt on Snowflake and tracks data work in Jira. One week, its customer churn model breaks after a CRM account merge. Here is what an export of Snowflake's query history alone would show about that week:

| Time | User or role | What the query did |
|---|---|---|
| Monday 05:40 | Transformation service role | Ran a scheduled build of the churn model |
| Monday 05:52 | Transformation service role | Ran a further set of queries against the churn model |
| Tuesday 14:18 | An analytics engineer | Ran several ad hoc selects against subscription tables |
| Tuesday 16:05 | Transformation service role | Rebuilt the churn model with new SQL |
| Tuesday 16:09 | BI service role | Refreshed the churn dashboard extracts |

Nothing in that table says anything went wrong. Monday's 05:52 queries were dbt tests, but query history does not mark which returned failing rows. Tuesday's rebuild looks like any other deployment. A reader cannot tell that a number on the board's churn dashboard was wrong for a day and a half.

## After: the same incident with dbt, Jira and the sign-off around it

Now place the other records beside the same timestamps.

| Time | Source | Record | What it adds |
|---|---|---|---|
| Monday 05:52 | dbt run results | `relationships` test on the churn model's account key: status fail, failures count above zero | That something broke, where, and how many rows |
| Monday 09:15 | Jira | BI-217 opened: "Churn model has subscriptions with no parent account" | The symptom in business words, and who owned it |
| Tuesday 14:18 | Jira comment | Diagnosis: merged CRM accounts left subscription rows pointing to retired account IDs | Why it broke; explains the ad hoc selects |
| Tuesday 15:50 | Git, linked to Jira | Commit "BI-217 map retired account IDs to surviving account" | What changed, tied to the ticket by its key |
| Tuesday 16:05 | dbt run results | Same test: status pass | That the fix worked against the test |
| Wednesday 11:30 | Jira comment | Finance lead confirms churn for the month matches billing | That the business number was accepted |

Every row in the "after" table explains a row in the "before" table. dbt's run results file lists each executed node by `unique_id` with a status, and test results carry a failures count. Jira links a commit to a work item when the commit message contains the key, which is how BI-217 reaches the code. The finance comment is the only record that the repair ended in an accepted number.

## What went missing, and where it actually lives

| Lost context | Where it lives | Kept how long, typically | Who can confirm it exists |
|---|---|---|---|
| Which test failed, and how badly | dbt `run_results.json` per invocation | Only if the team archives artifacts from each run | Analytics engineering lead |
| What the test was checking | dbt `manifest.json` and the project code | As long as the project is in version control | Analytics engineering lead |
| The symptom in business terms | Jira ticket description | Usually for the life of the Jira project | Jira project admin |
| The diagnosis | Jira comments, pull request threads, chat | Tickets long-lived; chat often not | Engineer who fixed it |
| The code change | Git commit, linked by the ticket key | Life of the repository | Analytics engineering lead |
| Acceptance of the number | Jira comment, email or a meeting | Varies; often only memory | Controller or finance lead |
| What ran and when | Snowflake `ACCOUNT_USAGE.QUERY_HISTORY` | Last 365 days | Data platform owner |

The last row is the irony: the system that holds the least explanation is also the one with a fixed window. Snowflake's `QUERY_HISTORY` view covers the last 365 days, so even the "before" version of an incident from two years ago may survive only if someone copied it out.

## The context no system holds: a change in meaning

Six weeks later, the same team changes how the churn model treats paused subscriptions. Every dbt test still passes, because a data test is a query for failing rows and passes when it returns none; none of the four generic tests checks what "churned" means. The run is green, Snowflake logs a rebuild, and churn for closed months moves.

In the "before" version, that change looks identical to the BI-217 repair: a rebuild by the service role. In the "after" version it looks like nothing at all unless someone opened a ticket or wrote the definition change down. This is the context most often missing even from well-connected histories, and the one most worth asking about. A company that logged metric definition changes, or reopened tickets when finance disputed a number, holds a record of judgment that tests do not capture. The pattern resembles the reasoning in [reconciliation break notes](/data-types/reconciliation-exceptions-ai-agent-training-data) and is part of what [AI training data usually lacks](/questions/what-data-is-missing-from-ai-training). Demand for any given company's records is judged only in SourceX's review.

## Who can describe it, and who can authorize

The analytics engineering lead can say which of the "after" sources exist and for which years. The Jira project admin can describe the ticket history, and the controller can say where finance sign-off was recorded. A licensing discussion needs the CEO's authorization, usually with the CFO or general counsel involved, because warehouse tables can include customer records under contract terms the data team does not control. The [Jira system page](/systems/jira) and the [Snowflake MCP resource](/resources/mcp/snowflake-mcp) give background on those tools; SourceX does not claim a connector to either.

Confirm the company baseline: 50+ full-time employees at peak (contractors excluded), documented operating history, rights to license, and an authorized contact. Companies in the U.S., Canada and the EU qualify, as do companies in the UK, Australia, New Zealand, India, Singapore, South Africa, Latin America, the UAE and Saudi Arabia when at least 70% of the data is in English. Sign the Channel Partner Agreement first.

Unknown until SourceX reviews it under the company's own agreement: whether the rights cover these records, how many incidents have a full "after" version, and whether a buyer wants them.

## Next step

> **Refer a company. No cap on rewards.** Default reward on a company's first qualifying transaction: the greater of $50,000 plus 5% and 15% of Actual Supplier Payout, with no cap; further qualifying transactions first agreed within 12 months of the first Closing pay 15%. Eligibility and payment conditions apply, including the USD 100,000 Minimum Transaction, and a signed Schedule A or addendum can differ. A lead, meeting or signature alone does not trigger payment.

If a data team you advise keeps the "after" version of its incidents, not just the query log, and an officer will take the call, [register as a partner](/register), check [who qualifies](/who-qualifies), and read the [terms](/terms) before you submit.

## Sources

- https://docs.snowflake.com/en/sql-reference/account-usage/query_history
- https://docs.getdbt.com/reference/artifacts/run-results-json
- https://support.atlassian.com/jira-software-cloud/docs/reference-issues-in-your-development-work/
- https://docs.getdbt.com/docs/build/data-tests
- https://refer.sourcex.si/terms
