Zum Inhalt springen
NEULerne Alaaddin kennen, deinen KI-Flaschengeist mit Stimme. trig8n startet am 1. Januar 2027. Neuigkeiten ansehen

Bibliothek / Datensynchronisierung & ETL

Datensynchronisierung & ETL

Reconcile Postgres records with an HTTP API and notify drift via Slack

On a schedule, it moves and syncs data using Postgres, Slack.

Was sie bewirkt

## Flag the records where two systems of record disagree Two systems that should hold the same records drift apart quietly, and nobody notices until a customer does. This workflow compares a database table against an API every night, decides which disagreements matter, and marks those records for a human. ### How it works One side is read with a SQL query you write, the other from an HTTP endpoint. Compare Datasets lines them up on a key column and sorts every record into four piles. Fields you list as noise are dropped before anything is counted. Without that step a timestamp the two systems write independently disagrees on every row, and the report is ignored within a week. What survives is triaged. A record whose critical fields disagree is flagged in the database with a needs-review column and escalated to your channel straight away, naming the fields and both values. Everything else waits for the once-a-day digest. Nothing is ever overwritten. The workflow does not decide which side is right, because only a person knows that. It decides which rows a person must look at, which is the part that does not scale by hand. There is no model in it: two values are either equal or they are not. ### Setup 1. Connect a Postgres credential and a Slack credential. 2. Put your SQL query on Read The Database Side and your endpoint on Read The API Side. 3. On Split Out The API Records, name the field holding the record array, for example data. 4. On Line Them Up, set the key column that identifies the same record on both sides. 5. Open Drift Rules and set compare_fields: both sides must return the same field names, and anything outside that list is ignored.

Die Schritte

  1. Nightly Reconciliation
  2. Drift Rules
  3. Read The Database Side
  4. Read The API Side
  5. Split Out The API Records
  6. Line Them Up
  7. Label Rows Missing From The API
  8. Records That Already Agree
  9. Explain Which Fields Differ
  10. Label Rows Missing From The Database
  11. Gather Every Difference
  12. Only The Records That Drifted
  13. How Bad Is This Drift?
  14. Flag The Record For Review

Insgesamt 20 Schritte.

Ähnliche Automatisierungen