mongoDB怎么把数据导出为csv或excel?用的可视化工具是robomongo,不知道有没有这功能。用命令行也行。
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
mongoexport -h [IP]:[port] -d [db] -c [collection] -u [user] -p [password] --type=csv -f [field1[,field2,field3,...]] > [filename.csv]
mongoexport please refer to the documentation
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.
The command line can be or mongochef~the best one
mongoexport is very easy to use! Always use mongoexport
What you said above is correct, but if your data is indeed flat, you can also use
For more syntax ofmongoexport
to directly export it to csv format:mongoexport
please refer to the documentationMongoDb 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.
The command line can be or mongochef~the best one
mongoexport is very easy to use! Always use mongoexport