
A production-grade modern data stack built on the Olist Brazilian e-commerce dataset, demonstrating end-to-end streaming ingestion, warehouse transformation, orchestration, and analytics across 100,000+ orders.
dbt docs generate. Green nodes are raw Snowflake source tables. Teal nodes are staging views and intermediate views. Dark teal nodes are materialized mart tables.fact_orders and dim_sellers queried live from Snowflake's analytics schema via Metabase:docs/ folder contains screenshots of the generated dbt documentation site. Key pages:docs/lineage_graph.png Full project lineage from sources to marts docs/fact_orders1–4.png fact_orders details, columns, tests, compiled SQL docs/int_orders_enriched1–4.png Intermediate model with business logic documentation docs/sources.png Raw source tables registered in ecommerce.raworder_id. All events for a given order (placed, delivered, reviewed) are routed to the same partition via message key. Kafka only guarantees ordering within a partition, so keying by order ensures related events are consumed in sequence.acks="all" on the producer. Instructs the broker to confirm a write before the producer considers the message sent. Slower than the default but correct for order data where losing a message is worse than incurring latency.enable_auto_commit=False combined with calling consumer.commit() only after a successful Snowflake write provides at-least-once delivery semantics. A crash between the write and the commit causes messages to be re-processed on restart rather than silently dropped.DbtTaskGroup over a bash task. Running dbt run as a single bash task in Airflow produces a monolithic log and treats the entire transformation as a single pass/fail unit. Cosmos exposes each dbt model as its own Airflow task, enabling model-level logs, automatic dependency enforcement, and partial re-runs that re-execute only failed models and their downstream dependents.--max-runtime-seconds flag that causes it to flush and exit after a fixed duration. This makes the same script compatible with two modes: continuous consumption for local development (no flag) and time-boxed batch consumption for Airflow scheduling (--max-runtime-seconds 60).unique and not_null on every primary key, accepted_values on order_status (8 valid statuses), not_null on financial and timestamp columns, and a relationships test verifying referential integrity between fact_orders.customer_id and dim_customers.stg_orders.sql and re-triggering the DAG. Results confirmed:stg_orders failed and was retried twice (per retries=2 in default_args) before being marked permanently failedint_orders_enriched and fact_orders were automatically skipped since they depend on stg_ordersstg_customers, stg_sellers, stg_order_items, int_seller_performance, and dim_sellers continued running and succeeded independentlysnowflake/setup.sql as ACCOUNTADMIN in a Snowflake worksheet. This creates the warehouse, database, schemas, and CSV file format.E-Commerce Data Platform | Python · Kafka · Airflow · Snowflake · dbt
Posted Aug 24, 2026
Rebuilt a 100K+ order pipeline with Kafka, Snowflake, dbt, and Airflow; 21 tests passed with model-level failure isolation and partial reruns.
0
0
Olist