AdvancedSQLFree prompt

Data Pipeline Monitoring: Detecting Anomalies in ETL Jobs with SQL,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n

SQL-based monitoring queries to detect data quality issues, pipeline failures, and anomalies in automated data pipelines before they corrupt downstream reports.

Create a set of SQL monitoring queries that automatically detect data pipeline problems including missing data, schema changes, volume anomalies, and freshness issues.

At a glance

Access

Free prompt

Open to copy without upgrading.

Prompt objective

Create a set of SQL monitoring queries that automatically detect data pipeline problems including missing data, schema changes, volume anomalies, and freshness issues.

Real use case

A data team at a logistics company discovered that their daily revenue dashboard was showing $0 for 3 days because an ETL job silently failed. Nobody noticed until the CFO asked about the numbers. They need automated SQL-based monitoring.

Customize these fields first

COMPANY NAMENUMBERAirflow/Cron/GitHub Actions

Replace the placeholders with your own context before you run the prompt. That usually improves the first output more than adding more instructions later.

Prompt

Create a complete data pipeline monitoring system using SQL for [COMPANY NAME]'s data warehouse with [NUMBER] tables and [NUMBER] daily ETL jobs.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n**Monitor 1 — Data Freshness:**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Query: last update timestamp per table vs. expected refresh time\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Alert when: table not updated within [X] hours of expected time\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- SQL: SELECT table_name, MAX(updated_at) FROM information_schema...\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n**Monitor 2 — Volume Anomalies:**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Query: row count today vs. 7-day average and 30-day average\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Alert when: row count deviates >[X]% from average\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- SQL: Compare COUNT(*) with LAG() window function over 30 days\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Handle seasonality: compare with same day of week last week\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n**Monitor 3 — Data Quality Checks:**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- NULL rate per critical column (alert if >[X]%)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Duplicate detection: COUNT(*) vs COUNT(DISTINCT primary_key)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Referential integrity: orphan records (FK with no matching PK)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Value range validation: negative prices, future dates, impossible values\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n**Monitor 4 — Schema Change Detection:**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- New columns added or removed\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Data type changes (INT to VARCHAR)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Constraint violations after schema migration\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n**Monitor 5 — Pipeline Dependency Graph:**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Table dependency map (which tables feed which)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Impact analysis: if table X fails, which dashboards break?\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Cascading failure detection\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n**Implementation:**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- dbt test definitions (if using dbt)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Or standalone SQL scripts scheduled via [Airflow/Cron/GitHub Actions]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Alert routing: Slack channel per severity\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n- Dashboard: monitoring status page with all checks\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nWrite complete SQL for each monitor with alert thresholds.

Open directly in an AI — the text is pre-filled:

How to use this prompt

  1. 1Replace the key placeholders first: COMPANY NAME, NUMBER, Airflow/Cron/GitHub Actions.
  2. 2Replace any bracketed placeholders like [this] with your own context.
  3. 3Add extra background information when you want more tailored results.
  4. 4Combine multiple prompts in one conversation when you need a richer output.
  5. 5Save your best-performing prompts so they are easy to reuse later.

Next best step

Open the guide first, then branch only if you still need more.

A guide for technical builders choosing between prompts, coding workflows, and agent-based implementation.

If this prompt is close but not quite right, generate variants next. If the job is recurring, move into the course library after the guide.

Related prompts

View all

Explore other prompt categories

Move sideways into adjacent libraries when the current category is not the full answer.

Free browsing stays open. Premium prompts unlock the reusable workflow layer.

Use the guides and role paths to validate the job first. Upgrade when you want the full prompt text, editable premium prompts, and the surrounding course paths in one place.

Free access

  • Browse guides, role paths, and category pages.
  • Preview prompts before you decide to upgrade.
  • Find the right starting point without friction.

Membership access

  • Unlock premium prompts and the full copy text.
  • See more workflow paths and course connections.
  • Keep the reusable templates in one place.
Chat on WhatsApp