84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我想将MongoDB的collection导出成CVS,在官网文档写可以用mongoexport导出
mongoexport
mongoexport --host localhost --db dbname --collection name --csv > output.csv
但他总警告我指定要导出的字段并无法导出,我要导出所有字段啊,就跟mysql导出cvs那样,怎样忽略他的警告呢?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
You must add an option to specify the fields you want to export. Mongodb will not select all fields for you by default, so you should add --fields <field1[,field2]>, -f <field1[,field2]> ;…
mongoexport -h localhost -d dbname -c collname -f field1,field2 --csv -o output.csv
You must add an option to specify the fields you want to export. Mongodb will not select all fields for you by default, so you should add --fields <field1[,field2]>, -f <field1[,field2]> ;…