# 100,000 orders told me why their customers don't come back

· Source: Data Engineering on Medium · Field: Technology & Digital — Data Science & Analytics, E-commerce & Digital Commerce · Depth: Intermediate, short

Summary

The article describes building a data warehouse for Olist, a Brazilian marketplace, processing 99,441 orders from 2016 to 2018, which generated \$15.8 million in revenue. A critical finding was a low customer repurchase rate of 3.05%, with recurring customers contributing only 5.71% of revenue, indicating a heavy reliance on continuous new customer acquisition. This insight emerged only after constructing a data warehouse from nine disparate CSV files, highlighting the necessity of proper data infrastructure before analysis. The author also identified common data modeling pitfalls, such as fan-out issues from multiple payment methods or reviews per order, and incorrect customer identification where `customer_id` did not represent a unique person, leading to inflated metrics. Correct modeling revealed that delivery delays severely impact customer satisfaction (e.g., 4.21 rating on time vs. 1.70 with severe delay) and that the top quartile of sellers generates 86.58% of revenue.

Key takeaway

For Data Scientists or Data Engineers building analytical systems, rigorously validate your data models and JOIN operations. Naive joins or incorrect entity definitions can silently produce false metrics, leading to flawed business decisions. Prioritize data integrity and a well-structured data warehouse to ensure your insights reflect reality, especially when analyzing critical metrics like customer retention or revenue contribution. Your analytical rigor directly impacts business strategy.

Key insights

Data integrity and proper modeling are crucial for accurate business insights, preventing misleading conclusions.

Principles

Method

Build a layered data warehouse architecture (CSV -> Staging -> Star Model -> Views) to transform disparate files into a cohesive business model for reliable querying.

In practice

Topics

Code references

Best for: Data Scientist, Data Engineer, AI Student

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Data Engineering on Medium.