Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

174 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify_etl

The spotify_etl project processes Spotify data from both the GDPR data releases and the developer API. This is being created for personal use and as an excercise in good practice ETL process design. It adheres to the medallion data architecture and seeks to perform the whole ETL task in a structured, maintainable and idiomatic way.

It is designed to reduce storage and especially compute load on the paired Neon cloud database, so it can remain on the free-tier.

Note

This project is a work-in-progress.

ETL Architecture

Here is a simplified mapping of the ETL workflow:

flowchart LR

%% Sources
subgraph SOURCES
    DataGDPR["GDPR Download\n(JSON)"]
    DataAPI["Spotify Dev API"]
end

%% Neon Database
subgraph NEON["NEON DATABASE"]
    SchemaBronze[("Bronze Schema")]
    SchemaSilver[("Silver Schema")]
    SchemaGold[("Gold Schema")]
end

%% Python
subgraph LOCAL["PYTHON"]

    subgraph MODELS["Pydantic Modelling"]
        IngestModels["Source-Agnostic Models<br/><div align='left'>
        • Validation<br/>
        • Normalisation<br/>
        • PK/FK generation<br/>
        </div>"]

        Adapters["Source Adapters<br/><div align='left'>
        • GDPR mapping<br/>
        • API mapping<br/>
        </div>"]

        Adapters --> IngestModels
    end

    subgraph ETL["ETL Processes"]
        ETLBronze["Bronze ETL"]
        ETLSilver["Silver ETL"]
        ETLGold["Gold ETL"]
    end
end

%% Main Flow
DataGDPR --> Adapters
DataAPI --> Adapters

IngestModels --> ETLBronze

ETLBronze --> SchemaBronze
SchemaBronze --> ETLSilver

ETLSilver <--> SchemaSilver
SchemaSilver --> ETLGold

ETLGold --> SchemaGold
Loading

Quick links

Todo

Updated 2026-06-11:

  • Modelling and ingestion is done for the GDPR data. Do the same for the Spotify API data.
  • MDM modelling and transformations in the Silver layer.
  • ETL for the Gold layer.

About

Spotify GDPR & API data pipeline built around the medallion architecture. It is an exercise in structured, maintainable & idiomatic Python ETL.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages