码迷,mamicode.com
首页 > 其他好文 > 详细

mongo 使用 mongoexport 按照条件导出 csv 文件

时间:2020-01-14 12:48:48      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:style   https   round   code   条件   field   mil   文件   type   

cankao : https://blog.csdn.net/enjolras_fuu/article/details/96479807

 

 

mongoexport --host 127.0.0.1 --port 27017 --db ELSA_MILESTONE_SUBSCRIPTION_SERVICE --collection ‘milestone_work_table‘ --type csv --fieldFile /opt/milestone_work_table.txt   --out /opt/milestone_work_table.csv  --limit 5

mongoexport -d test -c records -q { a: { $gte: 3 }, date: { $lt: { "$date": "2016-01-01T00:00:00.000Z" } } } --fields "_id,a,b,c,date" --type=csv --out exportdir/myRecords.csv

mongoexport -d test -c records -q ‘{ a: { $gte: 3 }, date: { $lt: { "$date": "2016-01-01T00:00:00.000Z" } } }‘ --fieldFile fields.txt --type=csv --out exportdir/myRecords.csv



原文链接:https://blog.csdn.net/enjolras_fuu/article/details/96479807

 

mongo 使用 mongoexport 按照条件导出 csv 文件

标签:style   https   round   code   条件   field   mil   文件   type   

原文地址:https://www.cnblogs.com/lshan/p/12191229.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!