Zum Inhalt springen
NEUMarktplatz und dein Team: Verkaufe, was du baust, und bekomm Pläne und Änderungen, die getestet sind, bevor du sie siehst. Neuigkeiten ansehen

Bibliothek / Datensynchronisierung & ETL

Datensynchronisierung & ETL

Kundendaten aus dem Lager von Postgres nach HubSpot und Segment synchronisieren

Hasht PostgreSQL-Zeilen und überträgt nur geänderte Datensätze an HubSpot-Kontakte und Segment-identify-Aufrufe, verfolgt den Synchronisationsstatus und meldet die Ergebnisse an Slack.

Was sie bewirkt

## Reverse ETL: Warehouse to SaaS Applications ### How it works Continuously pushes data from your warehouse (PostgreSQL) into SaaS tools so sales, marketing and support work with the same numbers as analytics. 1. Detect changes: every row is hashed. Only rows whose hash differs from the last successful sync are sent, so unchanged data never costs an API call. 2. Map & deliver: warehouse columns are mapped to each destination's fields (configurable JSON). HubSpot gets a batch upsert of contacts, Segment gets an identify batch (and forwards to your other tools). 3. Track state: each row is saved as synced, failed (exponential backoff) or dead (attempts exhausted, or invalid email until the data changes). 4. Stay safe: a run lock prevents overlapping runs, batches loop until the warehouse is drained, and Slack is told only when something needs attention. Upserts are idempotent, so retries never create duplicates. ### Setup steps - Add Postgres credentials to all Postgres nodes, then run the manual setup once. - Add credentials: HubSpot via Header Auth (Authorization: Bearer ), Segment via Basic Auth (write key as username, empty password). - Create the custom HubSpot properties used in the mapping (for example lifetime_value, churn_risk). - Edit Set Sync Config: warehouse table, key and email columns, enabled destinations, the two field mappings, batch size, retries, Slack webhook. Defaults sync the demo table. - Activate the workflow. Run it any time with POST /retl-sync-now. ### Layout 1 Setup 2-4 Config, lock, detect and deliver 5-6 State, loop, alert

Die Schritte

  1. Manual Trigger - Run Setup Once
  2. Postgres - Create Reverse ETL Tables
  3. Schedule Trigger - Every 10 Minutes
  4. Webhook - Sync Now
  5. Set Sync Config
  6. Code - Validate Config & Build Queries
  7. Config Valid?
  8. HTTP - Slack Config Error Alert
  9. Postgres - Acquire Sync Lock
  10. Lock Acquired?
  11. Postgres - Detect Changed Records
  12. Changes To Push?
  13. Code - Plan Destination Requests
  14. Postgres - Release Lock (No Changes)

Insgesamt 28 Schritte.

Ähnliche Automatisierungen