mongodb - mongoexport aggregate export to a csv file -


i want save result aggregation csv file.

using mongo cmd line tool can results want:

db.compras.aggregate({ $group : { _id : "$data.proponente", total : { $sum : "$price" } }} 

how translate mongoexport command saves results csv?

you can't run aggregate() queries through mongoexport. mongoexport tool intended more basic data export query filter rather full aggregation , data processing. write short script using favourite language driver mongodb, though.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -