using-dbt-for-analytics-engineering

Builds, tests, and validates dbt models using ref(), source(), and dbt show.

9|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/mathisdrn/orca --skill using-dbt-for-analytics-engineering-mathisdrn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-dbt-for-analytics-engineering
Source: https://github.com/mathisdrn/orca/tree/main/.agents/skills/using-dbt-for-analytics-engineering
Command: npx skills add https://github.com/mathisdrn/orca --skill using-dbt-for-analytics-engineering-mathisdrn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? It guides AI agents through dbt analytics engineering work—building models, writing tests, debugging errors, and assessing downstream impact—while enforcing best practices like DRY principles, data validation with dbt show, and avoiding breaking changes to models with consumers. ## Core Features & Use Cases - Model Building & Planning: Work backwards from desired output, mock upstream models, and validate results iteratively with dbt show before finalizing SQL. - Data Discovery & Testing: Profile unfamiliar sources, document findings, and write prioritized data tests (unique, not_null, relationships, accepted_values) based on actual discovery results. - Impact Assessment & Debugging: Evaluate downstream dependencies before changes using dbt ls selectors or MCP lineage tools, and classify/resolve parsing, compilation, and data errors. - Use Case: When asked to add a revenue metric to a dbt project, the skill reads existing model YAML docs, profiles source data with dbt show, plans the transformation, writes the model with ref() calls, adds targeted tests, and builds only affected downstream models with state:modified+. ## Quick Start Ask the agent to build a new dbt staging model for a specific source table and validate the output with dbt show.

Frequently Asked Questions about using-dbt-for-analytics-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a new dbt model correctly?▼

Plan backwards from the desired output: mock the final table, draft the SQL, identify required upstream models, then implement using ref() and source() instead of hardcoded names. Validate iteratively with dbt show to preview inputs and outputs before finalizing.

How do I debug dbt compilation and SQL errors?▼

Start by reviewing logs/dbt.log and target/run_results.json to classify the error as a YAML parsing issue, invalid model code, or invalid data. Fix the referenced files, then verify with dbt parse, dbt compile --select, or dbt build --select on the affected model only.

How do I check downstream impact before changing a dbt model?▼

Run dbt ls --select model_name+ to list downstream dependencies, or use the MCP get_model_lineage_dev tool for richer lineage. For column changes, grep downstream SQL files for references, then build with state:modified+ or a limited depth selector.

What data tests should I add to dbt models?▼

Prioritize unique and not_null on primary keys and relationships on foreign keys. Add accepted_values or not_null on other columns only when data discovery confirms the expectation, and avoid blanket not_null tests that burn warehouse credits with low signal.

When should I not edit a dbt model in place?▼

Do not edit in place when renaming, removing, or retyping a column on a model with downstream models, exposures, or BI consumers—that is a breaking change. Use dbt model versioning through a mesh workflow so consumers get a migration window.

How do I explore unfamiliar source data in dbt?▼

Use dbt show with inline queries and early LIMIT clauses to sample rows, identify the grain, check for duplicate or null keys, and profile columns. Document findings in a discovery report before writing any transformation SQL.