Spotify API 데이터 수집 과정에서 반복적으로 사용되는 파라미터 정보를 적재합니다.
주기적으로 데이터를 자동 백업하여 AWS S3 스토리지에 보관하고 있습니다.
sudo apt install postgresql postgresql-contrib
sudo systemctl enable postgresql
sudo systemctl start postgresqlsudo -u postgres psql
postgres=# CREATE DATABASE 'spotify';
postgres=# CREATE USER api WITH PASSWORD '<password>';
postgres=# GRANT ALL PRIVILEGES ON DATABASE spotify TO api;
postgres=# exit;
psql -h localhost -U api spotifyCREATE TABLE IF NOT EXISTS albums (
album_id VARCHAR(30) PRIMARY KEY,
release_date VARCHAR(10),
insert_date DATE
);
CREATE TABLE IF NOT EXISTS artists (
artist_id VARCHAR(30) PRIMARY KEY,
insert_date DATE
);
CREATE TABLE IF NOT EXISTS tracks (
track_id VARCHAR(30) PRIMARY KEY,
insert_date DATE
);- install pip modules for S3 data backup
pip install boto3
