[resolved] Pass paremeters to the URI in tFileFetch reading from database table

Hi All
I am new to Talend and exploring it's features. I need to download the weather data for different locations from openweathermap. I am using tFileFetch for that. Since I need to iterate for different locations, I need to pass different location name to the URI dynamically reading from a table. How can I achieve that?
Currently I am able to do that for a single location and able to write to an excel



Regards
Chittaranjan
5 REPLIES

Re: [resolved] Pass paremeters to the URI in tFileFetch reading from database table

Somehow I am not able to attach the screen shot. My URI is like following
"London&mode=xml&units=metric&cnt=7"
I want to pass different location name in place of London to the URI element reading from a database table

Please help
Regards
Chittaranjan
Four Stars

Re: [resolved] Pass paremeters to the URI in tFileFetch reading from database table

Hi Chittaranjan,
Put your all location data in one file / tfixedflowinput component or a database table
https://help.talend.com/search/all?query=tIterateToFlow&content-lang=en
This will help you.
Thanks
Vaibhav

Re: [resolved] Pass paremeters to the URI in tFileFetch reading from database table

Thanks Vaibhav
But how to I pass what i read from tfixedflowinput to the URI element in my tFileFetch?
Regards
Chittaranjan
Four Stars

Re: [resolved] Pass paremeters to the URI in tFileFetch reading from database table

Set input value to context variable and then  use that context variable inside URL
Vaibhav
Five Stars

Re: [resolved] Pass paremeters to the URI in tFileFetch reading from database table

check the KB article, it will show how to iterate over values and pass to the next component. 
https://help.talend.com/search/all?query=tFlowToIterate&content-lang=en