03-28-2023 08:48 AM
JSON Path Test_2023_03_28.slp (6.4 KB)
GOAL: Set up a mapper to write input document structure to new structure, deleting some paths, and renaming others.
ERROR: “Failure: Unable to write to JSON-Path: $.ACHData.employeeId, Reason: Expecting object for JSON-Path field reference ‘employeeId’, found: String, Resolution: Change the path to refer to an object”
How is a String not an Object in this use case?
Solved! Go to Solution.
03-28-2023 03:26 PM
I figured this one out. You can’t add paths to null objects.
Since ACHData is null for the second record, it’s impossible to add ACHData.employeeId. If I reverse the order of the rows in the mapper then the result is that ACHData is null for the record, because ACHData.employeeId is set by the first row and then everything is cleared by the second row.
This is currently undocumented behavior.
03-28-2023 03:26 PM
I figured this one out. You can’t add paths to null objects.
Since ACHData is null for the second record, it’s impossible to add ACHData.employeeId. If I reverse the order of the rows in the mapper then the result is that ACHData is null for the record, because ACHData.employeeId is set by the first row and then everything is cleared by the second row.
This is currently undocumented behavior.