Building an Enterprise Data Warehouse on Heroku: From Complex ETL to Seamless Salesforce Integration
Heroku unified Salesforce and 20+ internal app databases into a warehouse processing over 10 TB monthly, using Heroku Connect to replicate Salesforce data without API limits and Postgres follower databases to read app data without loading production. Heroku Postgres serves real-time operational analytics and staging, Redshift holds historical data, and Airflow runs 30+ DAGs and 200+ JSON-defined jobs built from Python templates for incremental, bulk and date-range loads. A 5-minute monitoring DAG checks and retries 12 regional Connect instances. Claimed results include 99.99% pipeline uptime, sub-minute freshness, 90% less transfer from incremental loads and 60% lower integration cost, though the piece leans heavily on product promotion.
Related posts
- Optimizing Data Reliability: Heroku Connect & Drift Detection
Heroku Engineering easyNoviceHeroku Connect syncs Salesforce data into Postgres by polling time windows, and long-running Salesforce transactions that commit after the window has moved can be missed, causing drift. A secondary poll re-runs the same poll bounds later to catch those changes. For Bulk API polls it now creates one bulk job per primary job, with a batch per primary batch, instead of many jobs. It also caps how many secondary tasks run at once, which reduces load on the Salesforce org and leaves more Postgres connections free for customer applications.
- A 15-Second Health Check for Your Heroku Connect Data Pipeline
Heroku Engineering mediumAdeptThe `heroku connect:diagnose` command in the Heroku Connect CLI plugin audits a Salesforce-to-Heroku Postgres sync and reports GREEN/YELLOW/RED status for connection-level checks (API version, permissions, database plan) and mapping/field checks (unique identifiers, binary and calculated fields, schema drift). Common warnings have concrete fixes: recreate the connection or file a support ticket for an outdated API version, move binary blobs to object storage such as S3 and sync URLs instead, avoid relying on cross-object formula fields that don't bump sync timestamps, and refresh mappings or revert migrations when Salesforce or Postgres schemas drift. Running it before schema changes or migrations is recommended as a proactive sanity check.
- How we built our Internal Data Warehouse at ClickHouse: A year later
ClickHouse mediumAdept
ClickHouse's internal data warehouse on ClickHouse Cloud now ingests about 6 billion rows (50 TB uncompressed) a day from nineteen sources and holds 470 TB compressed. A single monolithic Airflow hourly load job was replaced by dbt-managed transformations split into nine processes, which improved reliability and handled data arriving at different times across sources. Semi-structured real-time data such as Google Analytics nested arrays and JSON control-plane offloads is exposed both raw and as dbt-built aggregates joined into batch reports. Access points expanded from Superset to the ClickHouse Cloud SQL console, Growthbook for A/B tests, and an S3-mediated export to Salesforce, and the team plans to use compute-compute separation to scale ETL and BI workloads independently and cut costs.
- 98% faster queries, 50% lower cloud costs: Verihubs’ journey from Postgres to ClickHouse
ClickHouse mediumAdept
Verihubs replaced a Postgres warehouse fed by daily Airflow batch pulls with a ClickHouse-based real-time OLAP stack. Kafka Connect and Debezium CDC stream data into MergeTree tables for append-only logs and ReplacingMergeTree tables for updatable rows. Materialized views and projections build daily and monthly rollups for reconciliation and invoicing, and Dagster handles complex detection jobs. Queries dropped from 20-30 minutes to 2-3 seconds, and cloud costs fell up to 50%. Lessons include designing ordering keys up front, choosing MergeTree engines carefully, expecting asynchronous mutations, and planning backfills because materialized views don't backfill automatically.
- How we built the Internal Data Warehouse at ClickHouse
ClickHouse mediumAdept
ClickHouse's internal data warehouse ingests tens of sources (Control Plane, Data Plane, AWS CUR, GCP billing, Salesforce, M3ter and others) into S3 hourly, then loads them into ClickHouse Cloud with the s3 table function and transforms them in SQL. Airflow schedules the work and Superset serves BI to about 100 users. Idempotency comes from ReplicatedReplacingMergeTree with FINAL plus re-runnable DAGs. Consistency comes from insert_quorum=3 rather than "auto", so inserts fail and retry during node restarts instead of leaving replicas incomplete. The team also found it needed a third intermediate business-entity layer beyond raw and mart, chose a single large transformation DAG over Airflow dataset triggers, and drives database-level access control from Google groups mapped to tables, columns and row filters.