Last active
March 16, 2022 23:42
-
-
Save assafmo/8bf20feee80a79b34dce75c70ff23d2a to your computer and use it in GitHub Desktop.
Import an archive full of JSONs into CouchDB
This file contains 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
#!/bin/bash | |
#json per line (same result, but for example can use jq to set _id) | |
7z x -so $1 | jq -c . | couchimport --db mydb --type jsonl |
This file contains 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
#!/bin/bash | |
#json stream | |
7z x -so $1 | couchimport --db mydb --type jsonl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice hack thanks for sharing!