İçeriğe geç
YENİPazar yeri ve ekibin: geliştirdiğini sat; planlar ve değişiklikler sen görmeden önce test edilsin. Yeniliklere bak

Kütüphane / Veri Senkronizasyonu ve ETL

Veri Senkronizasyonu ve ETL

Score PostgreSQL table data quality and send issue alerts to Slack

When you run it, it moves and syncs data using Postgres, Slack.

Ne yapar

## Data Quality Engine: Missing, Duplicate and Anomalous Records ### How it works Scans any PostgreSQL table on a schedule (or on demand) and scores its quality. 1. Missing: required columns that are NULL or blank. 2. Duplicates: records that share the same business key, compared after trimming, lower-casing and collapsing spaces (so USER5@x.com matches user5@x.com). 3. Anomalies: numeric outliers found with a robust z-score (median and MAD, so the outliers themselves do not distort the baseline). Above 2x the threshold is critical. 4. Table health: freshness (is new data arriving?) and volume (is today's load far from the recent average?). Each run gets a 0-100 score from four dimensions (completeness, uniqueness, validity, timeliness), stored in dq_runs. Individual problems go to dq_issues, only once while they stay open, and are resolved automatically when fixed. Slack is notified only when something needs attention. ### Setup steps - Add Postgres credentials to all Postgres nodes and run the manual setup once. - Edit Set DQ Config: table, primary key, timestamp column, required, duplicate-key and numeric columns, thresholds, Slack webhook. The defaults check the demo table. - Set scopeHours to e.g. 24 to check only recent rows (0 = whole table, which also enables auto-resolve). - Activate the workflow. Trigger it any time with POST /dq-run. ### Layout 1 Setup 2 Triggers and configuration 3 Checks 4-5 Score, persist and alert

Adımlar

  1. Manual Trigger - Run Setup Once
  2. Postgres - Create DQ Tables
  3. Schedule Trigger - Hourly
  4. Webhook - Run Check On Demand
  5. Set DQ Config
  6. Code - Build Check Queries
  7. Config Valid?
  8. HTTP - Slack Config Error Alert
  9. Postgres - Detect Missing Values
  10. Postgres - Detect Duplicate Records
  11. Postgres - Detect Anomalous Values
  12. Postgres - Table Health Stats
  13. Code - Score & Classify
  14. Postgres - Save Run & Issues

Toplam 18 adım.

Benzer otomasyonlar