Data Processing in Shell
Susan Sun
Data Person
csvsql
:
More option arguments:
--insert
--db
--no-inference
& --no-constraints
Sample syntax:
csvsql --db "sqlite:///SpotifyDatabase.db" \
--insert Spotify_MusicAttributes.csv
Note:
Line break is used to keep code clean and readable
Use three forward slashes to initiate database name
End with file extension .db
for SQLITE database
Sample syntax:
csvsql --db "sqlite:///SpotifyDatabase.db" \
--insert Spotify_MusicAttributes.csv
Documentation:
csvsql -h
--insert In addition to creating the table, also insert the
data into the table. Only valid when --db is specified.
Sample syntax:
csvsql --no-inference --no-constraints \
--db "sqlite:///SpotifyDatabase.db" \
--insert Spotify_MusicAttributes.csv
Documentation:
csvsql -h
--no-inference Disable type inference when parsing the input.
--no-constraints Generate a schema without length limits or null checks.
Data Processing in Shell