Skip to content
All projects

Project 10 // Data engineering · Early project

Netflix Titles ETL

An early ETL: one CSV into a normalized MySQL model

Data flows from netflix_titles.csv through extract.py into MySQL dimension, fact, and link tables, then into a Power BI report.
Normalized dimension, fact, and link tables
MySQL
PyMySQL load script (extract.py)
Python
Report on the loaded tables
Power BI

In short

The question

How do you model a flat titles file so each genre, country, and rating is stored once and titles link to them?

What I built

  1. 01
    netflix_titles.csvFlat titles file
  2. 02
    extract.pySplits multi-value fields on commas; only the genre link loader is enabled so far
    • Python ETL with PyMySQL
  3. 03
    MySQL tablesDimension, fact and link tables; keys looked up at load
    • Relational data modeling
    • MySQL
  4. 04
    Power BIReport built on the loaded tables
    • Power BI

What it found

  • The repo holds the Workbench model, the load script, the Power BI file, and the source CSV.
  • In the current script only the genre link-table loader runs; the dimension and movie-fact loaders are written but not enabled, so the full load is unfinished.
  • MySQL
  • Python
  • Power BI

Full case study // tap a section to open it

01Problem & context

How do you model a flat titles file so each genre, country, and rating is stored once and titles link to them?

Titles carry several genres, countries, and cast members in one text cell. Splitting those into related tables is the same relational modeling that makes Power BI analysis cleaner than a flat CSV.

02My role & approach

Solo project: schema design in MySQL Workbench, the Python load script, and the Power BI report.

  1. 01

    Model the schema in MySQL Workbench (dimension, fact, and link tables).

  2. 02

    Read the CSV in Python and split multi-value fields on commas.

  3. 03

    Insert values into dimension tables, then resolve their keys when loading the fact and link tables.

  4. 04

    Build a Power BI report on the loaded tables.

Problems I hit and how I handled them

  • Multi-value text fields (genres, countries, cast) had to become link tables.
  • Foreign keys have to be looked up while loading, so load order matters.
03Tech stack
  • MySQL
  • Python
  • Power BI

Skills shown

  • Relational data modeling
  • Python ETL with PyMySQL
  • MySQL
  • Power BI
04What I learned & would improve

Lessons

  • Splitting one multi-value cell into link tables is straightforward; keeping load order and keys correct is the hard part.

What I would do next

  • Use parameterized queries instead of building SQL strings, so apostrophes in titles cannot break a load.
  • Run the dimension loaders first and wire every step into one repeatable script with row-count checks.
Next projectCan Mail Data Predict Housing Vacancy?
Esc

↑ ↓ to moveEnter to open