A wrapper on mongoexport to export the dump in tsv format. It uses mongoexport to get the dump in json and then run a node script to convert it into tsv.
- Node.js
- mongoexport
- npm install
NOTE:
- Use any argument you wish to pass to mongoexport, except --type (doesn't make any sense) and --fieldFile which is not supported yet.
- White spaces are not allowed in the values e.g. '{$where:" this.text.length>1000"}' (having space in query) will not work.
./mongoexportTSV.sh --db mydb --collection=articles --out ./urls.json --fields link,summary,title --query '{$where:"this.text.length>1000"}'
- Support --fieldFile
- Support white spaces in the query.
- Add test Script