Skill 詳細

using-dbt-for-analytics-engineering

Analytics engineering specialty.

一致度直接一致エンジニアリング 向けにレビュー済み
出典dbt-labs/dbt-agent-skills外部ソース
報告インストール数748人気度の参考値

使用前に確認

自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。

保存された出典プレビュー

SKILL.md

これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。

---
name: using-dbt-for-analytics-engineering
description: Builds and modifies dbt models, writes SQL transformations using ref() and source(), creates tests, and validates results with dbt show. Use when doing any dbt work - building or modifying models, debugging errors, exploring unfamiliar data sources, writing tests, or evaluating impact of changes.
allowed-tools: "Bash(dbt *), Bash(jq *), Read, Write, Edit, Glob, Grep"
user-invocable: false
metadata:
  author: dbt-labs
---

# Using dbt for Analytics Engineering

**Core principle:** Apply software engineering discipline (DRY, modularity, testing) to data transformation work through dbt's abstraction layer.

**STOP — is this a breaking change to a model with consumers?** Renaming, removing, or retyping a column — on a model that downstream models, exposures, or external/BI consumers depend on — is a **breaking change**. Do **not** edit it in place (that breaks those consumers the moment it deploys). **REQUIRED SUB-SKILL:** Use the `working-with-dbt-mesh` skill to roll it out with model versions (and a latest version pointer) so consumers get a migration window. Come back here for the SQL once the versioning approach is decided.

## When to Use

- Building new dbt models, sources, or tests
- Modifying existing model logic or configurations
- Refactoring a dbt project structure
- Creating analytics pipelines or data transformations
- Working with warehouse data that needs modeling

**Do NOT use for:**

- Querying the semantic layer (use the `answering-natural-language-questions-with-dbt` skill)
- Breaking changes to a model with consumers (column rename/remove/retype) — use the `working-with-dbt-mesh` skill to version the model instead of editing in place

## Reference Guides

This skill includes detailed reference guides for specific techniques. Read the relevant guide when needed:

| Guide | Use When |
|-------|----------|
| [references/planning-dbt-models.md](references/planning-dbt-models.md) | Building new models - work backwards from desired output and use `dbt show` to validate results |
| [references/discovering-data.md](references/discovering-data.md) | Exploring unfamiliar sources or onboarding to a project |
| [references/writing-data-tests.md](references/writing-data-tests.md) | Adding tests - prioritize high-value tests over exhaustive coverage |
| [references/debugging-dbt-errors.md](references/debugging-dbt-errors.md) | Fixing project parsing, compilation, or database errors |
| [references/evaluating-impact-of-a-dbt-model-change.md](references/evaluating-impact-of-a-dbt-model-change.md) | Assessing downstream effects before modifying models |
| [references/writing-documentation.md](references/writing-documentation.md) | Write documentation that doesn't just restate the column name |
| [references/managing-packages.md](references/managing-packages.md) | Installing and managing dbt packages |

## DAG building guidelines

- Conform to the existing style of a project (medallion layers, stage/intermediate/mart, etc)
- Focus heavily on DRY principles.
  - Before adding a new model or column, always be sure that the same logic isn't already defined elsewhere that can be used.
  - Prefer a change that requires you to add one column to an existing intermediate model over adding an entire additional model to the project.

**When users request new models:** Always ask "why a new model vs extending existing?" before proceeding. Legitimate reasons exist (different grain, precalculation for performance), but users often request new models out of habit. Your job is to surface the tradeoff, not blindly comply.

## Model building guidelines

- Always use data modelling best practices when working in a project
- Follow dbt best practices in code:
  - Always use `{{ ref }}` and `{{ source }}` over hardcoded table names
  - Use CTEs over subqueries
- Before building a model, follow [references/planning-dbt-models.md](references/planning-dbt-models.md) to plan your approach.
- Be
GitHub で全文を読む (外部ページ)
関連情報

関連する仕事