Finance Engineering & Data Infrastructure
ODS to ADS: a warehouse layout that survives a finance audit
Seamline Editorial · Finance content team · Updated
TL;DR
The layer that matters most in a finance audit is not the dashboard; it is DWD, the detail layer where grain and history live. ODS keeps the raw truth, DWD keeps one fact row per event with SCD2 history, DWS rolls it up, ADS serves it. Name the grain once, keep history, and an auditor can replay any number back to the source.
The layer an auditor actually looks at is not the dashboard
Most teams build the warehouse backwards. They start with the chart the CFO wants, work down to a query, and call the result a data model. It renders fine until someone asks a simple question: can you show me this number as it was three months ago? A chart cannot answer that. A detail layer with history can.
AWS describes a warehouse as a progression from an operational data store, through a propagation step that keeps change history, into a presentation layer for consumers. That shape maps cleanly to the four names finance teams use: ODS, DWD, DWS, ADS. The audit lives in the middle two. Get DWD right and the rest is plumbing; get it wrong and every report inherits the error.
ODS: keep the raw record, resist the urge to fix it
The operational data store is a faithful copy of what each source said. Orders, payouts, refunds, ad spend and 3PL invoices land here with their original fields and their original ids. Nothing is renamed, netted or corrected. The moment you clean a number in ODS, you destroy the evidence of what the source actually reported.
Think of ODS as the evidence locker. If a payout later turns out to be short, the first question is whether the source sent the right figure. You can only answer that if the landed payload is untouched. Keep the load metadata too: source, cursor, row count and run time. Every downstream row then carries a provenance stamp.
The ODS rule
Land it exactly as received. Cleaning belongs one layer up. If ODS and source disagree, the pipeline has a bug and you need the original to find it.
DWD: one grain, one history, one version of the truth
The detail layer is where a warehouse earns its keep. A fact table sits at one declared grain, one row per financial event, with dimensions for time, currency, store and legal entity. Grain is the single most consequential decision in the model. Write it down before the first load, because it is far cheaper to decide now than to discover in a month-end argument that one team counts orders and another counts events.
History is the second job. Dimensions that change must keep their old values with effective dates: a product moving category, a cost center reassigned, an FX rate restated. This is the SCD2 pattern AWS describes in its propagation step. Without it, a report run today silently rewrites the past, and a question about last quarter gets this quarter’s answer.
This is also where the two classic modeling schools meet. Kimball builds dimensional marts bottom-up around business processes; Inmon builds a normalized enterprise model top-down. For ecommerce finance the pragmatic answer is a normalized detail core feeding dimensional marts: one clean version of the truth, shaped for the questions people actually ask.
| Layer | Grain (one row =) | History | Who reads it |
|---|---|---|---|
| ODS | One source record as received | Append-only raw payload | Engineers, auditors tracing a source |
| DWD | One financial event (sale, refund, fee, payout) | SCD2 dimensions with effective dates | Analysts, reconciliation checks |
| DWS | One event class per day per store | Rebuilt from DWD | Finance analysts, planning |
| ADS | One metric per period per filter | Point-in-time snapshots | CFO dashboards, board packs |
DWS: summaries that can be thrown away and rebuilt
The summary layer exists for speed, not truth. It rolls DWD events up to convenient slices: net revenue by day, by store, by currency, by legal entity. Every number here must be reproducible from DWD. If a DWS figure cannot be rebuilt, it has become a second source of truth and will eventually disagree with the first.
Keep summaries shallow. One aggregation step from the detail layer is enough. Teams that stack summary on summary create a stack of derived numbers where an upstream correction has to ripple through several tables before anyone notices. When an FX rate is restated, you want to rebuild one layer, not untangle a chain.
- Every DWS cell is reproducible from a DWD query.
- One aggregation step, not a chain of rollups.
- Currency and entity are always dimensions, never baked into a column name.
- Rebuild on demand; never hand-edit a summary table.
ADS: serve metrics, not raw joins
The application layer is what finance sees. It should expose named, defined metrics such as net sales, gross margin and contribution profit, not hand-written SQL scattered across dashboards. A metric defined here has one formula, one owner and one base table. That is what “single version of truth” means in practice, and both Kimball and the AWS architecture guidance point to the same idea: define the business logic once, consume it everywhere.
The failure mode is a return to spreadsheets at the last mile. Someone exports ADS data, applies a private adjustment in Excel, and circulates a number that no longer matches the warehouse. The fix is not more tooling; it is a rule that adjustments live in the model with a reason code, where they can be reviewed, rather than in a personal workbook.
| Metric | Base layer | Definition |
|---|---|---|
| Net sales | DWD | Gross sales less refunds, at source currency, before fees |
| Net revenue | DWD | Net sales less platform and payment fees |
| Contribution profit | DWS | Net revenue less COGS, fulfillment and variable ad spend |
Why this layout survives the audit question
An audit is a replay exercise. Someone picks a number from a report and asks you to walk it back: from ADS metric, to DWS summary, to DWD event, to ODS payload, to the source system. A four-layer model makes that walk deterministic because each seam has one job and one stable key. A flat pile of joined tables makes it a research project.
Seamline’s published reconciliation detectors operate at this seam, surfacing fee residuals, refund gaps and payout mismatches per transaction and tracing them back to the event behind them. The point is not that a tool replaces the model. It is that a model with declared grain and kept history gives a detector something reliable to check. This is the layer Seamline works on; the warehouse design itself is yours.
The test
Pick any number in a board pack. If you cannot reach the source record in four hops or fewer, the model is decoration. Layers earn their keep only when the path back is short and repeatable.
FAQ
Is four layers overkill for a small store?
No. The layers are a separation of responsibilities, not four databases. At low volume they can live as views in one warehouse. What matters is that raw stays raw, detail keeps one grain and history, and summaries are rebuilt rather than edited.
What is SCD2 and why does finance need it?
Slowly changing dimension type 2 keeps old attribute values with effective dates instead of overwriting them. Finance needs it because a report must reflect the world as it was on the reporting date. Without it, a restated category or FX rate silently rewrites last quarter.
Kimball or Inmon: which one should we pick?
Most ecommerce finance teams end up with a normalized detail core, Kimball-style dimensional marts on top, and one set of metric definitions. The AWS architecture guidance frames the choice around a single version of truth; that goal matters more than loyalty to either school.
Where do refunds and fees go in this model?
They are events in DWD at the same grain as sales: a refund is a negative event, a fee is its own event, and each is tied to a payout reference. They are not columns subtracted from a sale. Keeping them separate is what lets a control total reconcile the events to the payout to the cent.
See reconciliation on data shaped like this
The demo runs Seamline’s published detectors over sample store data: fee residuals, refund gaps and payout mismatches, each traced back to the transaction behind it.