To communicate with the Spotify API an app has to be created. Follow the instructions at: Spotify Apps Dashboard.
Add the CLIENT_ID and CLIENT_SECRET values to the .env file.
They can be obtained from the Spotify app created in the previous step.
docker-compose up
cd airflow
mkdir -p ./dags ./logs ./plugins
echo -e "AIRFLOW_UID=$(id -u)" > .env
docker-compose up airflow-init
docker-compose up
Open Airflow. The default login is airflow and default password airflow.
Create the following Variables:
spotify_app_mount- the docker volue mount point in the task container.
/data
Create the dollowing connections:
spotify_db- the DB credentials:- Type: Postgres
- Host: db
- Schema: spotify
- Login: spotify
- Password: spotify
- Port: 5432
spotify_api- the Spotify app credentials:- Type: HTTP
- Host: https://accounts.spotify.com
- Login: <CLIENT_ID>
- Password: <CLIENT_SECRET>
To process new charts, copy them to the /data directory and run the data-collection DAG.