developing-incremental-models

Develop and troubleshoot dbt incremental models with merge and partition strategies.

2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/miptah21/skills --skill developing-incremental-models
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developing-incremental-models
Source: https://github.com/miptah21/skills/tree/main/.agents/skills/developing-incremental-models
Command: npx skills add https://github.com/miptah21/skills --skill developing-incremental-models

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you develop and troubleshoot dbt incremental models so you get correct, up-to-date results without paying the cost of full refreshes or falling into common incremental pitfalls.

Core Features & Use Cases

  • Strategy selection: Choose the right incremental strategy (table, incremental with merge/append/delete+insert, or insert_overwrite for partitioned warehouses) based on data patterns and performance constraints.
  • Correctness guardrails: Define a truly unique unique_key, enforce a full-refresh baseline first, and validate incremental behavior to prevent data drift.
  • Troubleshooting & optimization: Fix merge failures (duplicate keys), improve partition pruning, handle late-arriving data with lookback windows, and manage schema drift using on_schema_change.

Quick Start

Use this guidance to configure and run a new dbt model as incremental with a safe strategy, then verify it first with full-refresh and again with incremental runs.

Frequently Asked Questions about developing-incremental-models

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

FAQPage Schema
How do I choose the right dbt incremental model strategy?

To choose a dbt incremental model strategy, evaluate data patterns against append, merge, delete+insert, or insert_overwrite options to optimize build performance and prevent data drift.

How do I fix duplicate key merge failures in dbt incremental models?

Fixing duplicate key merge failures in dbt incremental models involves enforcing a truly unique unique_key. You must validate the incremental behavior with a full-refresh baseline first to prevent merge errors.

How do I handle late-arriving data in dbt incremental models?

Handling late-arriving data in dbt incremental models requires using lookback windows with incremental-safe filtering. This ensures delayed records are captured correctly without triggering unnecessary full refreshes.

How do I manage schema drift in dbt incremental models?

Managing schema drift in dbt incremental models requires configuring the on_schema_change parameter. This control allows the model to adapt to upstream column changes automatically during incremental runs.

How do I improve partition pruning in dbt incremental models?

Improving partition pruning in dbt incremental models requires applying incremental-safe filtering to your queries. Proper partition pruning limits scanned data, reducing compute costs and accelerating warehouse builds.

Why does my dbt incremental model need a full refresh validation?

A dbt incremental model needs a full refresh validation to establish a correct baseline. Running a full refresh first ensures historical data integrity before validating subsequent incremental updates.