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.

Quellinformationen

Repository
sawrus/agent-guides
Letzte Quellaktivität
16. Oktober 2026 um 19:08
Erkannte Sprache von SKILL.md
Englisch
Sterne
19
Forks
4

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
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 %} ```
Auf GitHub ansehen