❄️ Snowflake + dbt Demo
An e-commerce pipeline from raw source data to tested sales models. Explore each diagram and practise the explanation.
🧭 Study route
Overview → architecture → ingestion → model grain → incremental orders → tests → operations
This is a hands-on demo with synthetic data. Python runs dbt build; Airflow is not configured.🧭 STAR Practice
Click an answer to listen. Adapt the wording to your own experience.
🗺️ Walk me through the project
| Step | Recall | English answer |
|---|---|---|
| S · Situation | Built · demo | I built a hands-on e-commerce demo with synthetic data in Snowflake. |
| T · Task | Turn · data | The goal was to turn raw orders and customer data into trusted sales models. |
| A · Action | Load · model · test | I loaded the raw data, built Silver and Gold models with dbt, and added data tests. |
| R · Result | Deliver · metrics | The demo produces daily and customer sales, with reconciliation across models. |
🔄 How do incremental orders work?
| Step | Recall | English answer |
|---|---|---|
| S · Situation | Order versions | Orders can have multiple versions when a status or amount changes. |
| T · Task | Keep latest | I needed one current row for each order ID. |
| A · Action | Filter · rank · merge | The model filters newer timestamps, uses ROW_NUMBER to select the latest incoming version, and MERGEs by order ID. |
| R · Result | Update · insert | The sample updates an existing order and inserts a new one. Late or equal-timestamp records need additional handling. |
✅ How do you check data quality?
| Step | Recall | English answer |
|---|---|---|
| S · Situation | Trust metrics | Sales metrics need checks at both the record and aggregate levels. |
| T · Task | Validate | I wanted to catch invalid keys and inconsistent revenue. |
| A · Action | Test · reconcile | I used dbt tests for keys and relationships, plus custom SQL to check negative amounts and reconcile paid revenue. |
| R · Result | Compare · investigate | The tests compare Silver revenue with both Gold models. Matching totals alone do not prove source completeness. |
🚀 What would you improve for production?
| Step | Recall | English answer |
|---|---|---|
| S · Situation | Demo · scope | The current pipeline is a small demo with a local Python runner. |
| T · Task | Operate safely | Production would require reliable recovery and separate environments. |
| A · Action | Handle · monitor | I would add late-data handling, deterministic deduplication, environment isolation and monitoring. |
| R · Result | Improve · reliability | These changes would make failures easier to detect and recover from. They are proposed improvements, not implemented features. |