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'