Output the first N numer of rows from a csv into another:
head -n 5 data.csv > header.csv
Generate schema from csv
pip install csvkit
csvsql -d "," -q '"' -i postgresql spotifyschema.csv > spotify_schema.sql
- -d DELIMETER
- -q QUOTE CHARACTER
Output the first N numer of rows from a csv into another:
head -n 5 data.csv > header.csv
Generate schema from csv
pip install csvkit
csvsql -d "," -q '"' -i postgresql spotifyschema.csv > spotify_schema.sql