-
-
Save langsdlc/74e3b4998ac59716d050 to your computer and use it in GitHub Desktop.
Bash / JQ for Cloudant Bulk Upload & Download
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
| http post #####:#####@vulibrarygis.cloudant.com/campustour/_bulk_docs < tour.json |
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
| http https://vulibrarygis.cloudant.com/campustour/_design/tour/_view/historicalTour | jq '{"docs": [.rows[].value] }' > tour.json |
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
| find . -name '*.json' -exec cat {} \; | jq -s '{"docs": [ .[] ]}' > 'docs.json' |
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
| find . -name '*.json' -exec cat {} \; | jq -s '{"docs": [ .[] ]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment