Skip to main content

Claude Prompt to Build an ETL Data Quality Framework

Build a robust ETL data quality framework: validation rules, error handling, data profiling checks, quality scoring, and automated monitoring.

Füllen Sie die Platzhalter aus

Edit the values, then copy your finished prompt.

Ihr Prompt
prompt.txt

                                

What this prompt does

This prompt makes the model a data engineering expert that designs a complete data quality and error-handling framework for an ETL pipeline. You describe the pipeline with [data_source], [data_destination], [data_volume], [pipeline_frequency], and [etl_tool], and it returns validation rules, an error-handling strategy, implementation code, a quality-score design, monitoring, and recovery procedures.

The structure is what makes it production-grade. Validation is split into schema-level, row-level, and dataset-level checks, so it catches everything from a dropped column to a sudden 10x row count. The error-handling section maps error types to actions and severities, including a dead-letter queue design for rows that fail. Because you name your [etl_tool], it generates reusable, config-driven validation functions in that stack rather than pseudocode. The [custom_validation] and [monitoring_addition] slots let you bake in business rules and cost alerts specific to your pipeline.

When to use it

  • When bad source data keeps breaking dashboards or reports downstream.
  • Setting up a new pipeline and you want quality gates in from day one, not bolted on later.
  • When you need a dead-letter queue and quarantine workflow for rows that fail validation.
  • To define a single data-quality score that trends over time and flags gradual degradation.
  • When you need idempotent, replayable recovery procedures after a pipeline outage.

Example output

You get layered validation rules (schema, row, dataset) for each entity, an error-handling table mapping error types to detection, remediation, severity, and alerting, plus dead-letter-queue design. Then implementation code in your chosen tool with reusable validators and config-driven rules, a data-quality score (0-100) across completeness, accuracy, timeliness, consistency, and uniqueness with SQL per metric, monitoring and alerting rules, and recovery procedures covering reprocessing, reconciliation, backfill, and idempotency.

Pro tips

  • Name your real [etl_tool] stack (for example Python + Airflow + dbt) so the generated validators use idioms you can actually drop in.
  • Encode genuine business rules in [custom_validation] — things like "order total equals the sum of line items" catch errors generic checks miss.
  • Set [data_volume] and [pipeline_frequency] accurately; the dataset-level row-count and freshness checks key off your expected ranges.
  • Use [monitoring_addition] for cost or SLA concerns specific to your warehouse, such as alerting when compute credits spike unexpectedly.
  • Start by wiring up the dead-letter queue and dataset-level checks first — in my experience those two catch most production surprises before they spread.
  • Treat the generated code as a scaffold: review every threshold and remediation rule against your data before enabling auto-remediation.

Frequently Asked Questions

What ETL tools does this prompt support?
It generates the framework in whatever stack you set in `[etl_tool]`, such as Python with Apache Airflow and dbt. Naming your real tool makes the validation functions and code idioms usable rather than generic pseudocode.
Does it design a dead-letter queue?
Yes. The error-handling section maps error types to actions and severities and includes dead-letter-queue design for rows that fail required checks, plus quarantine handling for referential-integrity failures.
How is the data quality score calculated?
It defines a 0-100 score across five dimensions: completeness, accuracy, timeliness, consistency, and uniqueness. It also generates the SQL or queries to compute each metric so you can track the score over time.
Can it enforce my own business rules?
Yes, through the `[custom_validation]` variable. You supply rules like currency amounts needing exactly two decimal places and being positive, and it adds row-level checks for them alongside the standard validations.
Does it cover recovery after a pipeline failure?
Yes. It includes recovery procedures for reprocessing failed batches, reconciling data after an outage, backfilling historical corrections, and guaranteeing idempotency so re-running the pipeline is safe.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

Mehr in Data & SQL Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support