0

I have a collection called User(with userId as primary key) and am trying to export certain documents based on the Query attribute supported by MonogExport. My MongoExport command looks like :

mongoexport -h localhost -d mydb -o C:\account\user.json --collection user--query '{userId: {$in :[1233,1234,1235,1236]}}'

Based on the above, mongo creates a json file for us. But my major concern is, how to process this command, if length of this command increases to more than 8192 chracters(Message Displayed : the process command is too long)

user3092131
  • 41
  • 1
  • 1
  • 9

1 Answers1

0

This is not the problem of mongo. Windows command line only takes 8191 characters per line. Refer here for the solution

Community
  • 1
  • 1
Akash Dathan
  • 4,348
  • 2
  • 24
  • 45