I want to convert json format data in java object in Java transformation

517 views Asked by At

The requirement is:

I am using one Java transformation in Informatica developer client and my java code is returning the data in the JSON format and that result is store in one "Result" parameter.

Data sample like Result={ "result": [ { "ID": "101", "Name": "XYZ" } ] }

Now i want to store this data in the relational table say as Employee having two column as ID and Name.

So in java transformation, I am using two output port- 1 is Id(datatype as Integer) and another one is Name(datatype as String).

SO I want to write code in this manner that the ID value of the JSON data should go in Id output port and Name value of JSON data should go in Name output port.

1

There are 1 answers

0
andrewJames On

If you want to use a Java transformation for this, you will need to make the Jackson JAR file available on the INFA server, so your code can see Jackson on its classpath. (And you will have to do the same for any additional JAR file dependencies Jackson may also need.)

Normally, this is something the INFA admins would have to do for you, as a one-time task. This is because the classpath location is a directory on the INFA server (as chosen by you and/or the admins) - and you probably do not have access to it.