Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
This is our second week using talend as an organisation after training, so we are very fresh.
I am currently sending a body in trest to retrieve a token.
This is my setup
This is my tmap. The response is a string and not json for some unknown reason so textractjson didn't work.
I get that token successfully in this format.
How does one put that string value into a variable?
Regards,
Ryan
Hi
You can assign the string value to a variable on a tJavaRow component. eg:
tRest--main--tJavaRow
on tJavaRow:
context.varName=input_row.Body;
//context.varName is a context variable defined in the Context view.
Regards
Shicong
Hi
You can assign the string value to a variable on a tJavaRow component. eg:
tRest--main--tJavaRow
on tJavaRow:
context.varName=input_row.Body;
//context.varName is a context variable defined in the Context view.
Regards
Shicong
Hi Shicong_Hong,
Thank you for the reply.
I have given this a go and I believe it worked.
My twarn has the message: "Context varName = " + context.varName
This is the output.
So, thank you very much for the help. Much Appreciated.
Ryan
Glad to be of help. Thanks for your feedback!
Regards
Shicong