The Mental Model
Analytics engineering sits between raw data movement and business decision-making. The work is to make data clean, tested, documented, reusable, and understandable.
If data engineering brings boxes into a warehouse, analytics engineering labels the boxes, checks what is inside, creates shelves, and writes the map everyone else uses.
Course Dataset
The course uses a small ecommerce model. Individual worked examples provide their own rows and state any narrower assumptions.
| Table | Grain | Example columns |
|---|---|---|
raw_orders | one row per order in the lesson fixtures; deduplicate source events before using this grain | order_id, customer_id, amount, status, created_at |
raw_order_items | one row per item inside an order | order_id, product_id, quantity, item_price |
raw_customers | one row per current customer | customer_id, email, country, created_at |
Reconcile two revenue dashboards
In this example, finance reports 9,200 and sales reports 10,000 for the same day. Both read the same warehouse. The difference is a missing refund rule, not missing data.
| Component | Amount | Definition |
|---|---|---|
| Completed orders | 10,000 | Gross amount before refunds |
| Refunds | 800 | Refunds attributed to those orders |
| Net revenue | 9,200 | Gross amount minus refunds |
The analytics engineer defines the metric once, records the refund timing rule, tests the calculation, and points both dashboards at it. The sales dashboard can still show gross revenue, but its label must say so.
Acceptance check: a new consumer can reproduce 9,200 without copying a dashboard-specific formula.
Interactive Check
Question: A dashboard says revenue is $10,000, but another dashboard says $9,200. Is this mainly a charting problem or a modeling/metric definition problem?
Reveal the answer
It is usually a modeling or metric definition problem. Two dashboards probably use different filters, grains, joins, or revenue definitions. The fix is a governed metric, not another chart.
Practice: Classify the Analytics Stack
Place raw tables, staging models, marts, metrics, semantic layer, dashboards, and AI tools in the correct order.
Use the guided lab below to record your result, assumptions, and the check that would catch an incorrect result.