Option to send documents to stdout or to a file?
Closed this issue · 2 comments
rickhg12hs commented
Is there a command line switch or a config file option so that the generated documents are sent to stdout or to a file?
For prototyping documents it would be useful to not need to round-trip through a MongoDB database/collection. It would also be useful in situations when a MongoDB is temporarily unavailable due to maintenance, network non-availability, etc.
feliixx commented
Hi @rickhg12hs,
I added the possibility to write the document to a json file or to stdout directly ( see mgodatagen v0.9.5
you can use it by specifying the -o | --output
flag, for example:
./mgodatagen -f config.json -o /tmp/n.json
rickhg12hs commented
Works great! Thanks!