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”
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.