agentleFS
vaquarkhanvaquarkhan/data-engineering-agent-skills/skills/cdc-and-incremental-loading/SKILL.md

cdc-and-incremental-loading

Skill49 starsChanged 6 months agoMITView on GitHub

Guides agents through change data capture and incremental load design. Use when building or modifying watermark-based loads, upserts, deduplication, merge logic, late data handling, or replayable incremental pipelines.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the system changes data over time and full reloads are not the right answer.

    line 10
  2. Distinctive:

    Do not use this when a bounded full refresh is simpler and operationally safer.

    line 20
  3. Distinctive:

    no documented business key

    line 62
  4. Distinctive:

    delete handling is absent

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CDC And Incremental Loading

Overview

Use this skill when the system changes data over time and full reloads are not the right answer. It helps agents design safe incremental behavior with clear watermarks, merge rules, deduplication, and replay semantics.

When to Use

  • implementing CDC ingestion
  • designing watermark-based or timestamp-based incremental loads
  • merging inserts, updates, and deletes
  • handling late-arriving data
  • fixing duplicate or missing incremental records

Do not use this when a bounded full refresh is simpler and operationally safer.

Workflow

  1. Define the change contract. Include:
    • business key
    • change key or sequence
    • delete behavior
    • update semantics
    • source ordering guarantees
  2. Choose the incremental strategy. Typical options:
    • append-only
    • merge/upsert
    • snapshot replacement
    • log-based CDC
  3. Make watermark logic explicit. Record:
    • watermark column
    • lag tolerance
    • reprocessing window
    • retry and replay rules
  4. Guard against duplicates and missed changes. Deduplication and late-data handling should be first-class logic.
  5. Prove reruns are safe. Incremental pipelines that cannot be replayed safely are incomplete.

Common Rationalizations

RationalizationReality
"We can just use updated_at as the watermark."Timestamps alone often miss late changes, clock skew, or delete semantics.
"Duplicates are rare enough."Rare duplicates are still expensive when they affect published metrics.
"We can rebuild everything if something goes wrong."Large backfills are often slow, expensive, or operationally risky.

Red Flags

  • no documented business key
  • delete handling is absent
  • watermark logic depends on assumptions no one wrote down
  • replay requires manual surgery in production tables

Verification

  • The incremental contract covers inserts, updates, and deletes where relevant
  • Watermark, lag, deduplication, and replay rules are explicit
  • Late data behavior is defined
  • Reruns and backfills are operationally safe

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.