Data Engineering / Analytics · Case Study

Olist Marketplace Data Pipeline

I moved 99,441 marketplace orders from Kaggle through Azure and Snowflake into tested dbt models, ending with one clean row per order.

Portfolio project · public dataset · Snowflake and dbt · Completed · Updated

At a glance

Question
Ten raw datasets, each at a different grain: can they become order-level models whose counts, totals and delivery numbers I’d actually trust?
Data
Brazilian E-Commerce Public Dataset by Olist (Kaggle): 99,441 orders across 10 raw datasets Public data
Tools
Links
  • 99,441

    Orders, one row each

    after aggregating 112,650 items and 103,886 payments

  • 135

    dbt checks passed

    0 warnings, 0 errors

  • 8.1%

    Late deliveries

    7,827 of 96,476 orders with a delivery date

The problem

Marketplace teams want to know where orders get delayed, how sellers and regions compare, and whether slow deliveries show up in reviews. The answers sit in separate tables at different levels of detail. Join them directly and the rows multiply, so order counts, revenue and review scores all come out inflated.

The data

Olist’s public Brazilian e-commerce dataset from Kaggle: 99,441 orders, 112,650 order items, 103,886 payment records, 99,224 reviews and 3,095 sellers, in 10 raw datasets. This is my own portfolio project. Olist didn’t commission it, and I’m not claiming any business impact.

What I built

The whole pipeline, end to end: Python that pulls the data from the Kaggle API and uploads it to Azure Blob Storage, the Snowflake warehouse with its stage and Bronze tables, 10 dbt staging views, a core model with one row per order, seller-performance and customer-experience marts, and a small AI prototype that translates Portuguese reviews. The repository and its case study have all of it.

How it works

  • Land: the Kaggle download goes into an Azure Blob Storage container unchanged.
  • Load: a Snowflake storage integration, an external stage and COPY INTO statements fill the Bronze tables.
  • Stage: 10 dbt views clean up the sources. Prices, freight and payments are cast from FLOAT to number(18, 2), so totals stay exact to the cent.
  • Core: items, payments and reviews are aggregated per order before the join, so the model keeps one row per order.
  • Marts: one row per seller for volume and delivery, and one row per review for customer experience. The translation sample is joined on the left, so it can’t shrink the review population.

How I checked it

  • Bronze reconciliation: expected and loaded row counts matched for all 10 datasets, a difference of zero.
  • dbt build: 135 checks passed with 0 warnings and 0 errors. They cover required fields, unique keys, accepted statuses and scores, relationships, and the one-row-per-order and one-row-per-seller grain.
  • review_id isn’t unique on its own, so the review staging model builds its key from the review and its order.
  • is_late_delivery is NULL, not FALSE, when an order has no delivery date. A missing date can never count as on time.

What I found

7,827 of the 96,476 orders with a delivery date were late: 8.1%. Counting the 2,965 orders without a delivery date as on time would bring that down to 7.9%, which is exactly why the model leaves them undetermined. Delivery took about 12.5 days on average, and reviews averaged about 4.09 out of 5. Profiling also turned up timestamps in an impossible order, like orders handed to the carrier before they were bought. I kept and documented those rather than deleting them.

What it doesn’t show

The source is historical, so this is a validated batch pipeline, not a system that runs on its own. Scheduling, retries, notifications and run logging aren’t built yet, and reconciliation compares against fixed expected counts. The AI translation covers the first 50 reviews (21 had comments to translate). The dashboard isn’t published.

If I did it again

I’d run extract, load, reconcile and dbt build in order from an Airflow DAG with run logging and retries, record the expected counts at extraction instead of hard-coding them, and publish a fulfillment dashboard on top of the marts.

What I’d recommend

I’d report late deliveries only on orders that can actually be judged, show the undetermined ones as their own number, and sort out the impossible timestamps with the source before anyone uses delivery times to set seller targets.

Figures

rows per table, to scale order items112,650payments103,886orders99,441reviews99,224 aggregated per order, then joined core model99,441 · one per order delivery outcome of all 99,441 orders 88,649 on time7,827 late2,965 no date 8.1% late, of the 96,476 orders that can be judged
Public dataset, counts from the project’s validated dbt models. Orders without a delivery date are left undetermined.
Pipeline overview: Kaggle files land in Azure Blob Storage, load into Snowflake Bronze tables, and become dbt staging views, a one-row-per-order core model and two reporting marts.
Pipeline overview: Kaggle files land in Azure Blob Storage, load into Snowflake Bronze tables, and become dbt staging views, a one-row-per-order core model and two reporting marts.