본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트41k · #6671

dbt-transformation-patterns

하는 일

이 도구는 분석을 위해 데이터를 정리하고 테스트하도록 돕습니다. 데이터를 'staging', 'intermediate', 'marts' 같은 계층으로 구조화하고, 파일 이름을 일관되게 지어 이해하기 쉽게 만드는 법을 가르칩니다.

사용하는 경우

  • ✓분석을 위해 데이터를 정리하기 시작할 때.
  • ✓보고서를 위한 최종 테이블을 만들 때.
  • ✓데이터가 많아 더 효율적으로 처리하고 싶은 경우.

스킬 링크

https://github.com/wshobson/agents/blob/main/plugins/data-engineering/skills/dbt-transformation-patterns/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/data-engineering/skills/dbt-transformation-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Medallion 아키텍처를 사용해 데이터를 어떻게 정리할 수 있을까요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 각 계층(staging, intermediate, marts)에 특정 이름을 붙인 폴더 구조를 제안합니다. 또한 모두가 각 파일이 무엇을 나타내는지 이해할 수 있도록 데이터 파일 이름을 짓는 예시를 보여 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

dbt Transformation Patterns

Production-ready patterns for dbt (data build tool) including model organization, testing strategies, documentation, and incremental processing.

When to Use This Skill

  • Building data transformation pipelines with dbt
  • Organizing models into staging, intermediate, and marts layers
  • Implementing data quality tests
  • Creating incremental models for large datasets
  • Documenting data models and lineage
  • Setting up dbt project structure

Core Concepts

1. Model Layers (Medallion Architecture)

sources/          Raw data definitions
    ↓
staging/          1:1 with source, light cleaning
    ↓
intermediate/     Business logic, joins, aggregations
    ↓
marts/            Final analytics tables

2. Naming Conventions

Layer Prefix Example
Staging stg_ stg_stripe__payments
Intermediate int_ int_payments_pivoted
Marts dim_, fct_ dim_customers, fct_orders

Quick Start

# dbt_project.yml
name: "analytics"
version: "1.0.0"
profile: "analytics"

model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]

vars:
  start_date: "2020-01-01"

models:
  analytics:
    staging:
      +materialized: view
      +schema: staging
    intermediate:
      +materialized: ephemeral
    marts:
      +materialized: table
      +schema: analytics
# Project structure
models/
├── staging/
│   ├── stripe/
│   │   ├── _stripe__sources.yml
│   │   ├── _stripe__models.yml
│   │   ├── stg_stripe__customers.sql
│   │   └── stg_stripe__payments.sql
│   └── shopify/
│       ├── _shopify__sources.yml
│       └── stg_shopify__orders.sql
├── intermediate/
│   └── finance/
│       └── int_payments_pivoted.sql
└── marts/
    ├── core/
    │   ├── _core__models.yml
    │   ├── dim_customers.sql
    │   └── fct_orders.sql
    └── finance/
        └── fct_revenue.sql

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

Do's

  • Use staging layer - Clean data once, use everywhere
  • Test aggressively - Not null, unique, relationships
  • Document everything - Column descriptions, model descriptions
  • Use incremental - For tables > 1M rows
  • Version control - dbt project in Git

Don'ts

  • Don't skip staging - Raw → mart is tech debt
  • Don't hardcode dates - Use {{ var('start_date') }}
  • Don't repeat logic - Extract to macros
  • Don't test in prod - Use dev target
  • Don't ignore freshness - Monitor source data
자주 묻는 질문

'staging', 'intermediate', 'marts' 계층은 무엇인가요?

정리 단계와 같습니다. 'staging'은 초기 정리용이고, 'intermediate'는 비즈니스 로직이 적용되는 곳이며, 'marts'는 분석에 바로 쓸 수 있는 최종 테이블입니다.

데이터를 테스트하는 것이 왜 중요한가요?

테스트는 데이터가 정확하고 완전한지 확인해, 이후 보고서와 분석에서 오류가 생기는 것을 막아 줍니다.

'증분(incremental)'은 무슨 뜻인가요?

모든 데이터를 매번 처리하는 대신, 새로 바뀐 데이터만 처리하는 것입니다. 대량의 데이터에서는 훨씬 빠릅니다.

상세 정보

작성자의 원본 설명

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

repo: wshobson/agents

인기도

GitHub 스타
41k
순위
#6671
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬