SCa*_*lan 8 csv mongodb mongoexport
我正在使用mongodb 2.4.3,我无法让mongoexport工作.我用每个命令得到的错误信息是:
"JavaScript execution failed: SyntaxError: Unexpected identifier"
起初我认为问题出在我的查询参数上,这些参数很长.但是find()在查询中运行良好,所以我知道语法没问题.然后,我使用查询创建了一个新集合,并尝试使用以下内容导出集合:
mongoexport --db Oct2012 --collection sept8subset --csv --fields "text","created_at","user.screen_name","user.followers_count" --out sept8.csv
mongoexport --db Oct2012 --collection sept8subset --csv --fields text,created_at,user.screen_name,user.followers_count --out sept8.csv
mongoexport -d Oct2012 -c sept8subset --csv --fields text,created_at,user.screen_name -o sept8.csv
mongoexport --db Oct2012 --collection sept8subset --dbpath ~/db (should need dbpath as mongod instance is running)
mongoexport --db OCt2012 -collection sept8subset -o sept8.txt
mongoexport --db Oct2012 --collection sept8subset
在每种情况下,我得到"JavaScript execution failed: SyntaxError: Unexpected identifier".SyntaxError在哪里?
我正在尝试复制的集合有50,339个对象.如果它对于mongoexport来说太大了,我会从集合中取出5个文件来制作新的集合.然后我尝试使用与上面相同的命令结构导出它们.我仍然得到相同的错误消息.
现在我想知道问题是mongoexport是否无法处理涉及日期的数据.MongoDB文档指出我可能想使用客户端驱动程序编写自己的导出脚本.
有谁知道我的问题在这里?非常感谢你能提供帮助.