PostgreSQL Apache Airflow dbt Python Azure

The Core Idea

One system reads NetSuite โ€” everything else reads from here. The Data Hub eliminates the pattern where every tool independently calls the NetSuite API, competing for rate limits and getting inconsistent snapshots of the same data.

Why This Matters

Before the Data Hub, if Pennywise, Hawkeye, and the Platform API all needed work order data, each one called NetSuite separately. They'd fight over rate limits and sometimes see different data depending on when they pulled. The Data Hub creates a single source of truth: one sync, one pipeline, one set of verified data that all consumers share.

Architecture: Three Layers

Data flows through three distinct layers, each with a clear purpose:

โ†’
Raw Layer
โ†’
Core Layer
โ†’
Published Layer
โ†’
Consumers
LayerPurposeTechnology
Raw Data exactly as received from NetSuite โ€” no transformations. Acts as an auditable record of what was synced. Airflow DAGs โ†’ PostgreSQL
Core Cleaned, normalized, and business-logic applied. This is where dbt models transform raw data into consistent, typed tables. dbt SQL models โ†’ PostgreSQL
Published Consumer-ready views designed for specific use cases. Versioned so downstream tools don't break when transforms change. dbt โ†’ PostgreSQL views
Data Hub Console โ€” Sync Health showing 12 healthy entities with frequency and verification status
The Sync Health dashboard โ€” all 12 entities showing healthy status, sync frequency, last verification time, and new row counts.
Data Hub Console โ€” Schema browser showing published layer tables with column definitions
The Schema browser showing published-layer tables (the consumer contract) with column types โ€” what SDK clients and downstream tools bind to.

What It Syncs

Currently focused on NetSuite data. The Data Hub syncs ~11 entity types on two cadence tiers, all serialized through a single-slot Airflow pool (the platform never occupies more than one NetSuite concurrency slot):

EntityCadenceRowsStrategy
Work OrdersEvery 2h~330KDelta (lastmodifieddate)
Work Order LinesEvery 2h~1.6MDelta on parent
Item Stock (warehouse)Every 2h~17KFull pull (snapshot)
Corrective MaintenanceEvery 2h~24Delta
Compressor Units (assets)Nightly~4KDelta
CustomersNightly~1.4KDelta
EmployeesNightly~671Delta
Items (parts catalog)Nightly~10KDelta
Locations (warehouses)Nightly~50Delta
Region/AreaNightly~29Full pull
List Values (labels)Nightly~150Full pull
Data Hub Console โ€” Data browser showing published.v1_corrective_maintenance rows with sortable columns
The Data browser โ€” live view into published tables showing actual row data, filterable and sortable by any column.
Apache Airflow DAGs dashboard showing 6 DAGs โ€” frequent_tier, nightly_tier, heartbeat, weekly_reconcile, and backfill jobs
The Airflow DAGs powering the sync โ€” frequent_tier (every 2h), nightly_tier, hourly heartbeat, weekly reconciliation, and backfill jobs. All green.

Sync Pipeline (5 Steps Per Entity)

Deletion Detection

A weekly reconciliation job (Sunday 02:37 CT) pulls full ID lists per entity from NetSuite, diffs against every key ever landed in raw, and records vanished keys in a deletions table. Incomplete keysets abort before diffing โ€” partial data must never mass-flag deletions. Raw data stays append-only; core transforms stamp deleted_at from the facts.

Penny-Exact Verification

Financial data must be exact โ€” not "close enough." The Data Hub includes verification gates:

Consumers

Once data passes through the pipeline and is published, these systems consume it:

ConsumerWhat It ReadsStatus
Platform API Work orders, assets, inventory โ€” replacing direct NetSuite calls Coming
Pennywise GL data, financial records โ€” replacing direct NetSuite reads Coming

Operations & Monitoring

Data Hub Console โ€” API Keys management showing bearer tokens for the Contract API
API key management โ€” bearer tokens for the Contract API. Tokens are shown once at creation; only the hash is stored.
On the Roadmap

The Data Hub is the foundation for the proactive intelligence vision. When both operational data (from the Platform API) and financial data (from Pennywise) flow through a single, verified pipeline, background agents can couple the two โ€” "battery replacements are trending high" meets "here's the margin impact" โ€” and surface it to the right person.