Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend Community,
I have a rest service using tRESTClient that send parameters (header and body) via a REST GET call.
How can I see the URL being executed in its total string format.
tLogRow only shows the result set returned
Thanks
Is your URL hard coded? If so, you should probably change that. Add it to a context variable. If you do that, you can change it without having to change the job and recompile it. You can also make use of the context variable in other areas quite easily.
Hi
The URL is not hardcoded, if I understand correctly - or is there something specific your are referring too?
Please see my config in the original post (screen captures).
Thank you
How can I add the context variable to display the URI on execution?
You can use a tJava.....
System.out.println("My URL is: "+context.URL);
Or you can add it to a column in a tMap (for example) and use a tLogRow
I placed the tJava with code specified after my tRestClient and got :
Exception in thread "main" java.lang.Error: Unresolved compilation problem: URL cannot be resolved or is not a field
Ah I see. Replace the tJava with a tMap. Map the input columns to the output. Add an output column and put.....
context.URL
.....in the new column. Keep the tLogRow connected (refresh the schema) and you will see the URL printed by the tLogRow
I might be misunderstanding
But here is my tMAP settings
I am not getting the URL in the output
Thanks
You have to add it. By the way, you have duplicated all of your output columns
I did add the variable, but no success
Do you perhaps have an example to better articulate?
Thanks