Skip to main content

dbt-patterns

Provides dbt development patterns for materialization strategy, incremental models, and audit-column macros; use when building dbt models, writing macros, or configuring materializations.

소스 정보

저장소
sawrus/agent-guides
최근 소스 활동
2026년 10월 16일 19:08
감지된 SKILL.md 언어
영어
스타
19
포크
4

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
dbt-patterns
description
Provides dbt development patterns for materialization strategy, incremental models, and audit-column macros; use when building dbt models, writing macros, or configuring materializations.
# Skill: dbt Development Patterns ## When to load When building dbt models, writing macros, or configuring materializations. ## Materialization Strategy | Layer | Materialization | Why | |:---|:---|:---| | `staging/` | `view` | Always reflects source | | `intermediate/` | `ephemeral` | Reduce clutter | | `marts/` | `table` or `incremental` | Pre-computed for BI | ## Incremental Model ```sql {{ config( materialized='incremental', unique_key='order_id', incremental_strategy='merge', partition_by={'field': 'order_date', 'data_type': 'date'}, ) }} SELECT order_id, user_id, order_date, total_amount FROM {{ ref('stg_orders') }} {% if is_incremental() %} WHERE order_date >= (SELECT MAX(order_date) FROM {{ this }}) - INTERVAL '3 days' {% endif %} ``` ## Audit Columns Macro ```sql {% macro audit_columns() %} CURRENT_TIMESTAMP AS loaded_at, '{{ invocation_id }}' AS dbt_invocation_id, '{{ this.name }}' AS dbt_model {% endmacro %} ```
GitHub에서 보기