Turn business questions into reproducible warehouse analyses
A vendor-neutral skill for turning a business question into a reviewed, read-only, reproducible warehouse-analysis plan.
Why it matters
Transform ambiguous business questions into carefully scoped, read-only warehouse queries with clear provenance, validation checks, and confidence-rated findings that support decision-making without overstating evidence.
Outcomes
What it gets done
Define analytical contracts by clarifying population, metrics, time windows, and decision context before querying
Review proposed SQL queries for grain preservation, join duplication, privacy exposure, and interpretation risks
Validate query results against trusted references and inspect for nulls, duplicates, and unexpected patterns
Report findings with explicit scope, method, confidence levels, caveats, and reproducible query summaries
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-warehouse | bash Overview
Warehouse Analysis
A vendor-neutral skill for turning a business question into a reviewed, read-only warehouse query and a provenance-backed report naming scope, method, confidence, and caveats. Use it for answering business questions against an authorized warehouse or reviewing a proposed query - it explicitly excludes warehouse administration, pipeline repair, or production data changes.
What it does
This skill turns a business question into a careful, reproducible warehouse-analysis plan. It is vendor-neutral and assumes no particular schema, semantic layer, connector, or command-line tool, and it defaults to read-only work - identifying the data needed, reviewing a proposed query, and communicating results without overstating what the evidence supports.
Before proposing a query it establishes the decision the analysis should inform, the population/metric/dimensions/time window, the authorized warehouse or query interface, relevant schema documentation, and any privacy or minimum-group-size constraints - asking a focused question for anything missing rather than inventing table names, column names, business definitions, credentials, or results. Its seven-step workflow: define the analytical contract (question, population, metric, window, decision), calling out ambiguous terms like "active" or "revenue" to resolve before querying; find governed sources, preferring documented metrics and curated models over raw event streams, recording each source's grain, freshness, and known exclusions, and labeling the plan provisional if a source can't be verified; draft a read-only query only once the real schema is known, selecting only needed columns, filtering the time window explicitly, guarding null/zero-division cases, and avoiding row-level personal data when an aggregate answers the question; review the query against a checklist covering join-grain preservation, one-to-many duplication risk, timezone/partial-period handling, and unnecessary exposure of identifiers or small groups; execute only through a user-authorized, read-only interface, stopping if the interface is unavailable or the scope exceeds authorization; validate the result against a trusted reference, inspect null rates and duplicates, and test whether conclusions hold under reasonable window changes, without inferring causality from a descriptive query; and report with provenance in a compact structure:
Finding: [what the data shows]
Scope: [population and period]
Method: [metric and source summary]
Confidence: [high, medium, or low, with reason]
Caveats: [freshness, exclusions, quality, or privacy limits]
Next step: [optional validation or decision input]
A worked example ("did weekly activated accounts improve after the onboarding change?") shows the pattern end to end: clarify the activation definition and comparison window, locate the governed metric and cohort source, aggregate without selecting account-level identifiers, review for cohort overlap and seasonality, then report the change as an association with confidence and caveats - not as proof of causation.
When to use - and when NOT to
Use it when a user wants to answer a business question against an authorized data warehouse, needs a proposed SQL query reviewed for grain/join/privacy/interpretation risk, or needs a clear record of an analysis's scope, freshness, and assumptions. It explicitly steps back from warehouse administration, pipeline repair, access escalation, schema mutation, or production data changes - those are out of scope entirely, not just deprioritized.
Inputs and outputs
Input is the business question, the authorized warehouse/query interface, and available schema documentation. Output is a reviewed, read-only query (or query summary) plus a compact provenance report naming the finding, scope, method, confidence level, and caveats.
Who it's for
Analysts and agents answering business questions against a data warehouse who need a disciplined, auditable process - governed sources, a reviewed read-only query, and a provenance-backed report - rather than an ungrounded query against an unverified schema.
Source README
Warehouse Analysis
Overview
Use this skill to turn a business question into a careful, reproducible warehouse-analysis plan. It is vendor-neutral and assumes no particular schema, semantic layer, connector, or command-line tool.
The skill defaults to read-only work. It helps identify the data needed, review a proposed query, and communicate results without overstating what the evidence supports.
When to Use
- The user wants to answer a business question using an authorized data warehouse.
- A proposed SQL query needs a review for grain, joins, filters, privacy, or interpretation risks.
- An analysis needs a clear record of scope, freshness, assumptions, and source tables.
Do not use this skill for warehouse administration, pipeline repair, access escalation, schema mutation, or production data changes.
Required Inputs
Before proposing a query, establish:
- The decision or question the analysis should inform.
- The population, metric, dimensions, and time window.
- The authorized warehouse or query interface available to the user.
- The relevant schema documentation or table metadata.
- Any privacy, retention, regional, or minimum-group-size constraints.
If a required input is missing, ask a focused question. Never invent table names, column names, business definitions, credentials, or query results.
Workflow
1. Define the analytical contract
Restate the request as:
- Question: what is being measured or compared.
- Population: which entities are included and excluded.
- Metric: numerator, denominator, aggregation, and unit.
- Window: dates, timezone, and whether the period is complete.
- Decision: how the result will be used.
Call out ambiguous terms such as “active,” “customer,” “revenue,” or “last month.” Resolve ambiguity before querying.
2. Find governed sources
Prefer documented metrics, curated models, and governed tables over raw event streams. Use only schema information supplied by the user or available through an authorized interface.
For each proposed source, record:
- table or model name;
- expected grain and primary key;
- freshness or maximum available date;
- owner or documentation reference;
- known exclusions and quality warnings.
If the source cannot be verified, label the plan as provisional and stop before presenting numerical conclusions.
3. Draft a read-only query
Create a query only when the real schema is known. The query should:
- select only the columns needed for the stated question;
- filter the requested time window explicitly;
- use qualified column names and deterministic joins;
- guard division by zero and null-sensitive calculations;
- avoid row-level personal data when an aggregate answers the question;
- include a conservative row limit for exploratory output when appropriate.
Do not emit guessed SQL with fictional identifiers. If no authorized execution tool is available, provide the reviewed query for the user to run rather than claiming it was executed.
4. Review before execution
Check the proposed query against this list:
- Does every join preserve the intended grain?
- Can a one-to-many join duplicate the numerator or denominator?
- Are test, deleted, internal, or incomplete records handled deliberately?
- Are timezone boundaries and partial periods explicit?
- Does the query expose identifiers or small groups unnecessarily?
- Would a simpler aggregate answer reduce data access?
- Are metric definitions consistent with the documented source?
Revise any failed check before execution. For sensitive or high-impact decisions, ask for review by the data owner or another qualified analyst.
5. Execute only with authorization
Run a query only through a user-authorized, read-only interface. Do not request credentials in chat, bypass access controls, broaden permissions, or turn a read-only task into a write operation.
Stop if the interface is unavailable, the scope exceeds the user's authorization, or the result would reveal restricted personal or confidential data.
6. Validate the result
Before interpreting output:
- compare row counts and totals with a trusted reference when one exists;
- inspect null rates, duplicates, and unexpected categories;
- test whether conclusions change under reasonable window or filter choices;
- separate observed values from hypotheses about their causes.
Do not infer causality from a descriptive query. Do not hide contradictory or incomplete evidence.
7. Report with provenance
Use a compact result structure:
Finding: [what the data shows]
Scope: [population and period]
Method: [metric and source summary]
Confidence: [high, medium, or low, with reason]
Caveats: [freshness, exclusions, quality, or privacy limits]
Next step: [optional validation or decision input]
Include the query or a reproducible query summary when disclosure is appropriate. Redact secrets, credentials, and unnecessary row-level data.
Example
Request: “Did weekly activated accounts improve after the onboarding change?”
Safe response plan:
- Clarify the activation definition, rollout date, eligible population, timezone, and comparison window.
- Locate the governed activation metric and account cohort source.
- Aggregate weekly counts or rates without selecting account-level identifiers.
- Review cohort overlap, partial weeks, seasonality, and join duplication.
- Report the observed change as an association, with confidence and caveats, not as proof of causation.
Security & Safety Notes
- Treat warehouse contents and schema metadata as confidential unless the user establishes otherwise.
- Use least privilege and read-only access; never modify tables, permissions, pipelines, or production configuration.
- Minimize personal data and aggregate results whenever possible.
- Never place credentials, tokens, connection strings, or raw sensitive records in prompts or reports.
- Stop and escalate to the data owner when policy, authorization, or disclosure boundaries are unclear.
Limitations
- This skill cannot discover an undocumented schema or verify a result without an authorized data source.
- It does not replace organization-specific metric definitions, privacy policy, or expert review.
- It does not diagnose pipelines, administer warehouses, or make product and business decisions.
- Conclusions remain limited by source quality, freshness, sampling, and the analytical design.
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.