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
#first, let's unzip the fetched archive | |
gunzip out.json.gz | |
#second, import data into mongo thanks to mongoimport | |
ls -1 out.json | while read jsonfile; do mongoimport - host $MONGODB_HOST - db $MONGODB_DB -u $MONGODB_USER -p $MONGODB_PASS - collection $MONGODB_COLLECTION - file $jsonfile - batchSize 500; done | |
#finally, remove the uncompressed file | |
rm out.json |
NewerOlder