Last active
December 19, 2015 08:38
-
-
Save ichiban/5926568 to your computer and use it in GitHub Desktop.
How to upload a large SQLite3 table into Google Docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mode tabs posts | |
.output /tmp/posts.tsv | |
select * from posts; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install rename # if you don't have "rename" command | |
cd /tmp | |
split posts.tsv posts_ # split the tsv into chunks without extensions | |
rename -n 's/$/.tsv/' posts_* # then, rename chunks with .tsv extensions. first, dry-run. looks good? | |
rename -v 's/$/.tsv/' posts_* # rename them and import them one by one by hand |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment