Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I am very new to Talend. I am working on a task where I have to load the data from oracle database to rest interface. I have designed my job like below. I have to load the data from database as the nested JSON structure into REST interface. I have designed my job like below.
in the input schema I have mapped the output from twritejsonfield component. The data should be passed in the below format.
Key: “testKey”, Value: { "name": "testUser" } 😞
curl -X POST -H "Content-Type: application/vnd.kafka.json.v2+json" --data "{ \"records\" : [ { \"key\": \"testKey\", \"value\": { \"name\": \"testUser\" } } ] }"
I am not sure where to accommodate this format in the trestclient component.
The below is working fine in trest component.
Please help on how to pass my json data to rest via the Trestclient or Trest components in the above format.
Thank you!
Regards,
Priya
tRestClient will read the POST body from a variable called 'string'. In the incoming row, have your body in a schema variable called 'string' and make sure your input schema for the tRestClient has the one variable 'string' in it.
hello, Priya ,
I need to create new data by using a POST method in talend , i have JSON input and authentication as a barrier token. my question is that by using tREST component how to do that?
pls help me
thank you