Working:
.\mongoexport.exe --db mydb --collection slideproof_user_event_date_count --csv --out
events.csv --fields '_id,first_day'
.\mongoexport.exe --db mydb --collection slideproof_user_event_date_count --out
events.json --fields '_id._p,first_day'
Not working (only first field/column has content) written, :
.\mongoexport.exe --db mydb --collection slideproof_user_event_date_count --csv --out
events.csv --fields '_id._p, first_day'
How can I enable correct output for .csv with subdocument fields?
The solution is to avoid spaces in the --fields argument:
this works:
--fields '_id._p,value.count'
This does not:
--fields '_id._p, value.count'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With