Kütüphane / Veri Senkronizasyonu ve ETL
Veri Senkronizasyonu ve ETL
Reconcile Postgres records with an HTTP API and notify drift via Slack
On a schedule, it moves and syncs data using Postgres, Slack.
Ne yapar
## 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.
Adımlar
- Nightly Reconciliation
- Drift Rules
- Read The Database Side
- Read The API Side
- Split Out The API Records
- Line Them Up
- Label Rows Missing From The API
- Records That Already Agree
- Explain Which Fields Differ
- Label Rows Missing From The Database
- Gather Every Difference
- Only The Records That Drifted
- How Bad Is This Drift?
- Flag The Record For Review
Toplam 20 adım.
Benzer otomasyonlar