mongoDB怎么把数据导出为csv或excel?
用的可视化工具是robomongo,不知道有没有这功能。
用命令行也行。
黄舟2017-05-02 09:22:28
What you said above is correct, but if your data is indeed flat, you can also use mongoexport
to directly export it to csv format:
mongoexport -h [IP]:[port] -d [db] -c [collection] -u [user] -p [password] --type=csv -f [field1[,field2,field3,...]] > [filename.csv]
For more syntax of mongoexport
please refer to the documentation
给我你的怀抱2017-05-02 09:22:28
MongoDb itself is non-relational. Currently, mainstream MongoDb operating software does not and does not need to support the function of exporting to a relational table.
To export to csv or excel, you can only write a program yourself.