Forum Discussion
If I captured your input data correctly, this attached pipeline should help get you started:
Community.9525.slp (4.8 KB)
The mapper combines the Array map() method with the sl.zipObject() method to bring the column names and row values together in an object array. The following splitter will flatten the data for your SQL Insert.
This looks really good and looks like the solution. I am getting an error and it is probably because I’m slightly off on the object above.
Failure: Expecting object for JSON-Path field reference ‘entity’, found: null, Reason: Expecting object for JSON-Path field reference ‘entity’, found: null, Resolution: Change the path to refer to an object
It really is:
{statusline:{},entity{},headers{}}
When I refer to anything in there though I have always used $entity as you did so I am not understanding why it isn’t doing the reference properly.
I added a first splitter to get:
jsonPath($, “entity.items[*]”) this then let:
the Mapper Object see columnNames and rows in the Input Schema on the left which when I just connect the JSON output to the mapper there was nothing showing in the Input Schema.
It looks good now but the Json Splitter isn’t returning anything and hence the mapper. No errors. No output.
- bojanvelevski4 years agoValued Contributor
Hi @Jarek,
This sounds like a Collation issue. Check if there’s a Url setting added in the account you are using in the JDBC snaps.
This is what I have in the account settings. Is there a way to add e.g. UTC format or something similar?
jdbc:teradata://tdwd/TMODE=ANSI,CHARSET=UTF8
BR,
Jarek