Data & Analytics
Data warehousing: keep what was true then
When you need a warehouse, and when you don't
Four layers, each with a job
01
Raw
As delivered, kept
Every load stored exactly as it arrived, so any later layer can be rebuilt.
raw data that gets “cleaned” in place.
02
Staging
Cleaned and renamed
One spelling for each status, one format for each date, one name for each field.
business rules creeping in here instead of the model.
03
Modelled
Facts, dimensions, history
Jobs, invoices and customers at a stated grain, with versions kept when they change.
a customer table that only holds today's values.
04
Marts
Shaped for one team
Small, fast tables for finance, operations or marketing, built from the modelled layer.
marts with their own definitions of shared numbers.
Three kinds of history
| customer | territory | valid |
|---|---|---|
| Acme Properties | Northside | Jan 1 – Jun 2 |
| Acme Properties | Eastside | Jun 3 – now |
Q1 revenue for Northside?
Counts Acme's Q1 work, because it was Northside then.
| Monday | open quotes | value |
|---|---|---|
| Sep 1 | 37 | $148,200 |
| Sep 8 | 41 | $156,900 |
| Sep 15 | 35 | $139,400 |
What was the pipeline worth on Sep 1?
$148,200, from that Monday's snapshot, even though those quotes have since closed.
| job | status | at |
|---|---|---|
| J-442 | booked | Sep 2, 09:14 |
| J-442 | scheduled | Sep 2, 11:40 |
| J-442 | completed | Sep 5, 15:20 |
How long from booked to completed?
For J-442, three days. Across September, from every job's events.
What a warehouse hands off
In
Out
Worth building when the past has to stay put
Good fit
- Reports combine several systems.
- Numbers for closed periods must not change.
- You ask questions about trends, not just today.
Not the right fit
- One system's built-in reports answer what you ask.
- Very little data. A few modelled views in your existing database may be enough.
Questions about data warehousing
Do we need Snowflake or BigQuery?
Often not. PostgreSQL holds a modest business's history comfortably; larger warehouses make sense when volumes or many concurrent users demand them. Starting candidates, not requirements.
How long should history be kept?
As long as decisions look back, often several years for finance, less for raw web events. We set it per table, with you.
Is it real time?
Usually updated on a schedule, often overnight or hourly. Live screens belong in the operational system.
What does it cost to run?
For most small and mid-sized businesses, a database server and scheduled jobs. We size it to your data before recommending anything larger.