Skip to content

Instantly share code, notes, and snippets.

@ichiban
Last active December 19, 2015 08:38
Show Gist options
  • Save ichiban/5926568 to your computer and use it in GitHub Desktop.
Save ichiban/5926568 to your computer and use it in GitHub Desktop.
How to upload a large SQLite3 table into Google Docs.
.mode tabs posts
.output /tmp/posts.tsv
select * from posts;
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