1

次のコマンドを使用して、mongoexport (バージョン 2.6) MongoDB データを csv 形式にしようとしています。

$ mongoexport  --port 27017 -d test -q {userId:123 , name:'John'} -c  user_datas -f userId --csv -o /myOutFile.csv

そして私は得る

"Error parsing command line: too many positional options have been specified on the command line"

しかし、これら 2 つの条件を個別にクエリすると、正常に動作します。

$ mongoexport  --port 27017 -d test -q {userId:123} -c user_datas -f userId --csv -o /myOutFile.csv

$ mongoexport  --port 27017 -d test -q {name:'John'} -c user_datas -f userId --csv -o /myOutFile.csv

mongoexport最初のコマンドの問題は何ですか?

4

0 に答える 0