Dynamic Url for TRestClient

Highlighted
Four Stars

Dynamic Url for TRestClient

hello, 

I'm new in Talend, and I would like to use an  access token from one Api
( i have used Trestclient -> textractJsonFields -> tFileOutputDelimeted) ,so i get my access token in a csv file 
Now, i would like to use this token as a parameter in another API call ( using TrestClient) !!!

I have found  a possible solution using Tjava component to get the "access_token" from the csv file and use it as a context variable in TRestClient URL 
 
tJava
  |
onsubjobok
  |
tRestClient

so , i'm stuck in using Tjava component !!!
Any help please , appreciate your response!!!





Accepted Solutions
Community Manager

Re: Dynamic Url for TRestClient

Why would you not use a tFileInputDelimited to read the Access Token in your job that needs this? You will be writing unnecessary Java if you try to do this with the tJava.

 

You can use a tContextLoad component with the tFileInputDelimited.


All Replies
Community Manager

Re: Dynamic Url for TRestClient

Why would you not use a tFileInputDelimited to read the Access Token in your job that needs this? You will be writing unnecessary Java if you try to do this with the tJava.

 

You can use a tContextLoad component with the tFileInputDelimited.

Four Stars

Re: Dynamic Url for TRestClient

Thanks a lot Smiley Wink

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog