Discussion:
[mongodb-dev] mongoexport with query option
RANJEET SINGH
2018-08-20 14:52:26 UTC
Permalink
Hello All,

I tried to export some documents from a specific collection and save it
as an CSV file with the fieldnames in first line.
I use the command line and following code:

C:\MMSAutomation\versions\mongodb-win32-x86_64-3.6.5-ent\bin>mongoexport.exe
--ssl --port 27017 -u "XXXXXXXX" -p "XXXXXXXX" --authenticationDatabase
"admin" --host rel-XXXXXXXX -d "HidpRawData" -c
"DelphiFdcSyncMessages.files" --type=csv --query
'{"filename":"Account_75018000002U5beAAC.751180000024gjJAAQ.75218000000l86B.csv"}'
-o "E:\install\Tetris\Result\output08172018.js"

Errors given below as .....


2018-08-20T10:44:19.415-0400 error validating settings: query '[39 123
102 105 108 101 110 97 109 101 58 65 99 99 111 117 110 116 95 55 53 48 49
56 48 48 48 48 48 50 85 53 98 101 65 65 67 46 55 53 49 49 56 48 48 48 48 48
50 52 103 106 74 65 65 81 46 55 53 50 49 56 48 48 48 48 48 48 108 56 54 66
46 99 115 118 125 39]' is not valid JSON: json: cannot unmarshal string
into Go value of type map[string]interface {}
2018-08-20T10:44:19.416-0400 try 'mongoexport --help' for more
information


Could anyone help on above issue ?
--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/80719e74-1a0a-433f-9189-31d9e7d7f023%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...