Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Spotify-DemoProject/postgresql

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgresql

Spotify API 데이터 수집 과정에서 반복적으로 사용되는 파라미터 정보를 적재합니다.
주기적으로 데이터를 자동 백업하여 AWS S3 스토리지에 보관하고 있습니다.

Structure

스크린샷 2024-01-01 오전 1 46 21

Before Start

sudo apt install postgresql postgresql-contrib
sudo systemctl enable postgresql
sudo systemctl start postgresql
sudo -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 spotify
CREATE 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

Result

스크린샷 2023-12-30 오후 9 54 32

스크린샷 2024-01-01 오전 1 49 53

About

Save Spotify API Params.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.