You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: remove Q### prefixes + live BQ validation complete
- Remove all Q### and DQ## prefixes from query titles
- All 25+ queries validated via live BQ dry-run (sm-irestore4)
- Update spec: batches 1-5 validation complete
- Add sm_metadata nav group to docs.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: specs/query-library-spec-codex.md
+34-37Lines changed: 34 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Query Library (AI Analyst) — Spec (Codex)
2
2
3
-
Status: In progress (Batch 1 shipped)
4
-
Owner: TBD (Docs + AI Analyst)
5
-
Last updated: 2026-01-27
3
+
Status: In progress (Batches 1–5 shipped)
4
+
Owner: Docs (Data Activation) + AI Analyst
5
+
Last updated: 2026-01-28
6
6
7
7
## Background
8
8
@@ -118,9 +118,19 @@ Navigation note (v0):
118
118
- They're the patterns most likely to improve analyst self-serve and reduce AI Analyst failure modes on LTV/retention.
119
119
- Validation status:
120
120
- Live BigQuery execution validation: **done** (2026-01-27, `sm-irestore4`)
121
-
-All 18 queries executed successfully and returned plausible results.
121
+
-Batch 3 SQL templates executed successfully and returned plausible results.
122
122
- Issue found and fixed: Product Combinations query was missing `sku IS NOT NULL` and product-title exclusion filter, causing "Order Specific Details - Not a Product" to pollute results. Fixed by adding standard exclusion pattern.
123
123
124
+
### Batch 4 (shipped to docs; pending dry-run gate)
125
+
- Added “Attribution & Data Health (diagnostics)” queries DQ01–DQ06.
126
+
- Static schema/column validation: done for the SQL Query Library page (includes `sm_metadata` + `sm_transformed_v2` examples).
127
+
- Live BigQuery dry-run validation: pending engineering gate.
128
+
129
+
### Batch 5 (shipped to docs; pending dry-run gate)
Target: attribution coverage + data health probing (the “why is everything direct / missing?” queries).
349
+
Status: shipped; live BQ validation passed (2026-01-28, `sm-irestore4`).
340
350
341
-
Why these queries:
342
-
- They answer the gating questions analysts need before trusting attribution breakouts.
343
-
- They reduce guesswork by combining **metadata-first** freshness/coverage signals with **orders-first** reality checks.
351
+
Target: attribution coverage + data health diagnostics ("why is everything direct / missing?") plus actionable follow-up patterns.
344
352
345
353
Notes:
346
354
-`dim_data_dictionary` lives in `your_project.sm_metadata.dim_data_dictionary` (not `sm_transformed_v2`).
347
-
- We added schema docs for `sm_metadata.dim_data_dictionary` and extended the docs column validator to cover `sm_metadata` so these examples can be statically checked.
348
-
349
-
Batch 4 queries included:
350
-
- DQ01 — Table freshness / stale tables (`sm_metadata.dim_data_dictionary`)
351
-
- DQ02 — Attribution column coverage on `obt_orders` (`sm_metadata.dim_data_dictionary`)
0 commit comments