agentleFS
mejbaurbaharmejbaurbahar/software-tester-skills/skills/data-pipeline-etl-testing/SKILL.md

data-pipeline-etl-testing

Skill1 starsChanged 54 days agoMITView on GitHub

Use when testing ETL/ELT pipelines, data warehouses, dbt models, Spark/Airflow jobs, and analytics data quality — schema, row-count and checksum reconciliation, null/uniqueness/referential rules, freshness, SCD logic, Great Expectations/dbt tests, and idempotent reruns.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Idempotent reruns: run twice → same result, no dupes (MERGE/upsert, partition overwrite).

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Data Pipeline & ETL Testing

Data bugs are silent: dashboards look fine and are wrong. Test data, not just code.

Test pyramid for data

  1. Unit — transformation functions/SQL CTEs on tiny fixtures (pytest + pandas/Polars/Spark local, dbt unit tests).
  2. Schema/contract — column names, types, nullability, enums; contract with upstream producers.
  3. Data quality (in-flight) — assertions on each run.
  4. Reconciliation — source vs target.
  5. Pipeline/integration — DAG runs end to end on a sample.
  6. Monitoring — freshness, volume, distribution drift in prod.

Data-quality rules (dimensions)

DimensionCheck
CompletenessNOT NULL critical columns; row counts vs source ±tolerance
UniquenessPK/natural key has no duplicates
ValidityEnums, regex, ranges, positive amounts
ConsistencyReferential integrity; cross-table sums equal; currency/units uniform
Timelinessmax(updated_at) within SLA
AccuracySpot-check vs source of truth; reconcile aggregates
DistributionMean/stddev/null-rate drift vs baseline
# dbt schema.yml
models:
  - name: orders
    columns:
      - name: order_id
        tests: [unique, not_null]
      - name: customer_id
        tests: [{ relationships: { to: ref('customers'), field: customer_id } }]
      - name: status
        tests: [{ accepted_values: { values: [created, paid, shipped, cancelled] } }]
# Great Expectations (fluent)
validator.expect_column_values_to_not_be_null("order_id")
validator.expect_column_values_to_be_between("amount", min_value=0)
-- reconciliation
SELECT (SELECT COUNT(*) FROM src.orders) - (SELECT COUNT(*) FROM dw.fact_orders) AS diff;
SELECT SUM(amount) FROM src.orders WHERE dt=:d EXCEPT SELECT SUM(amount) FROM dw.fact_orders WHERE dt=:d;

Pipeline behavior tests

  • Idempotent reruns: run twice → same result, no dupes (MERGE/upsert, partition overwrite).
  • Backfill a range; late-arriving & out-of-order data; SCD Type 2 effective-dating (no overlaps/gaps).
  • Schema drift: new/removed/renamed upstream column → alert, not silent null.
  • Failure: mid-load crash → atomic (no partial partition), resumable.
  • Timezone & DST in partition keys; PII masked in lower environments (test-data-engineering).
  • Performance: volume test at 10× rows; skew (hot keys); small-file problem.

Airflow: DagBag import test (no cycles/import errors), airflow tasks test, task-level idempotency.

Related

database-testing, data-migration-testing, test-data-engineering, observability-testing

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.