[SERVER-18403] assertion: 16619 code failed to parse Created: 11/May/15  Updated: 11/May/15  Resolved: 11/May/15

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jephin Davis Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Hi,

When trying to run the below export, i am getting error as assertion: 16619 code FailedToParse: FailedToParse: Bad characters in value: offset:17

mongoexport --host xxx.xx.com --port 20000 --username xxxxx --password xxxxx --db xxxxxx --collection survey_responses --query '{"retail_format":FLS,"recorded":{:new Date('1430024400000'),:new Date('1430629200000')},"is_impersonate":false}' --csv --fields "u_ldap_id","retail_employee_id","retail_employee_full_name","retail_employee_type","retail_user_title","retail_format","retail_user_group","retail_employee_business_unit","retail_manager_user_name","retail_manager_full_name","retail_region_number","retail_district_number","retail_department","retail_department_name","retail_department_title","retail_employee_compensation_plan","retail_preferred_store_number","retail_league_number","retail_store_number","recorded","retail_preferred_format","retail_preferred_region_number","retail_preferred_district_number","retail_employee_flsa_status","retail_organization_format","retail_employee_classification","retail_phone","question_1","answer_1","question_2","answer_2","survey_id","eng_svy_question_1","eng_svy_answer_1","retail_pebble_user_id","created","retail_is_selling_department" --out mood.csv



 Comments   
Comment by Sam Kleinman (Inactive) [ 11/May/15 ]

Based on this error message it looks like you're using an older version of mongoexport. The version of the tools that come with the 3.0 release of MongoDB are compatible with older versions of MongoDB and have been substantially improved to include better validation and error reporting.

The --query argument requires that documents adhere to more strict JSON formatting than the shell and other formats. See MongoDB JSON Formats for more information.

I believe that there are JSON formatting issues in your query input:

  • the FLS string should be quoted.
  • In the recorded embedded document, it appears as if you're attempting to specify a field name as a ":new Date()" object. Field names must be strings.
  • the date format should use this alternate formating which is different from the shell.

I'm going to close this ticket: the SERVER project is for bugs and feature requests associated with the core MongoDB server. You can use the TOOLS project for bugs and feature requests for the MongoDB tools. For MongoDB-related support discussion please post on the mongodb-users group
or Stack Overflow with the mongodb tag.

Regards,
Sam

Generated at Thu Feb 08 03:47:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.