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 ?