Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

facebook Twitter
Email
Print Bookmark Alert me when this article is updated

Feedback

"Got parse error at ".", position XX: "SPECIAL_EXPECTED" (Error Code: 1)" while loading data to MongoDB target using DocumentAsJson column in Informatica
Problem Description
​Consider the following value sent is to DocumentAsJson column in MongoDB Target:

{ "item": "i_test_69", "qty": .75 }

When session/mapping is run, the row is rejected with the following error:

ERROR : (23072 | WRITER_1_*_1) : (IS | IS_Name) : Node_name : WRT_8229 : Database errors occurred:
FnName: Execute -- [Informatica][MongoDBODBC] (110) Error from MongoDB Client: Got parse error at ".", position 30: "SPECIAL_EXPECTED" (Error Code: 1)
FnName: Execute -- [DataDirect][ODBC lib] Function sequence error
ERROR : (23072 | WRITER_1_*_1) : (IS | IS_Name) : Node_name : WRT_8425 : ERROR: Writer execution failed.
ERROR : (23072 | WRITER_1_*_1) : (IS | IS_Name) : Node_name : WRT_8114 :
Row # [1] in bad file

INFO : (23072 | WRITER_1_*_1) : (IS | IS_Name) : Node_name : CMN_1053 : : Rowdata: ( RowType=0(insert) Src Rowid=1 Targ Rowid=1
  DocumentAsJson (DocumentAsJson:UniChar.1023:): "{ "item": "i_test_69", "qty": .75 }"
Cause
This parsing error is thrown from the Mongo C driver third-party library because the JSON input is invalid (that is, .75 not a valid number in JSON according to the specs https://tools.ietf.org/html/rfc7159).
Solution
Informatica MongoDB Driver and the Mongo C driver third-party library expects JSON data as per the JSON standards.

To resolve this issue, make sure upstream mapping sends the valid (as per the json standards) JSON data to MongoDB target like 0.75.
More Information
​JSON formatter:

https://jsonformatter.curiousconcept.com/

Here also it shows .75 is an invalid number.
Applies To
Product: PowerExchange; PowerCenter; Data Quality
Problem Type: Product Feature
User Type: Developer
Project Phase: Implement
Product Version: PowerExchange for MongoDB; PowerCenter; Informatica 10.x
Database:
Operating System:
Other Software:

Reference
Attachments
Last Modified Date:6/3/2020 1:36 PMID:617932
People who viewed this also viewed

Feedback

Did this KB document help you?



What can we do to improve this information (2000 or fewer characters)