Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous9
Contributor
Contributor

tRestClient Configuration to extract Data from API

Hello Team,

I am extracting the data from the ECB API and wanted to configure the dynamic settings for the Source and Target Currency.

I have the Source Currency table where I have a list of 10 currencies that I need to convert into EURO which acts as Base currency and I would like to iterate oly these 10 currencies as of now which is there in the table.

I can iterate the Source currencies in a separate pipeline but need to integrate with the ECB URL "https://sdw-wsrest.ecb.europa.eu/service/data/EXR/D.CHF+CNY+CZK+HUF+RON+TRY+USD.EUR.SP00.A?startPeriod=2022-12-25". In short, would like to remove the manual input of the currencies from the URL and use it from a Source table.

Appreciate your help.

Thank you!

Labels (5)
3 Replies
Anonymous
Not applicable

Hi

Can you take an example to explain what you need to remove the manual input of the currencies from the URL?

 

Regards

Shong

Anonymous9
Contributor
Contributor
Author

Hi @Shicong Hong​ ,

 

I wanted to remove the "https://sdw-wsrest.ecb.europa.eu/service/data/EXR/D.CHF+CNY+CZK+HUF+RON+TRY+USD.EUR.SP00.A?startPeri...".  currencies defined here (CHF+CNY and so on...) and instead wanted to extract the information from the db and iterate the currencies which are there in the column. in a table.

 

In the below example I have a db table with 4 currencies and i am able to iterate them but not sure how to configure the column in REST client URL. Hope this helps.

 

0695b00000bGimxAAC.png 

Thank you and Best Regards

Zaliinaa
Contributor
Contributor

Configuring the tRestClient for API data extraction sounds like a fun challenge! For your case, you can use a variable in the API URL to pull the currencies dynamically from your Source Currency table. This way, you won't have to hard-code them each time. It might help to set up a loop in your pipeline that constructs the URL based on your list of currencies.

I faced a similar situation when working on a project where I had to fetch various data points from an API. I built a small function that generated the URL dynamically, which saved me so much time. Also, while you’re working with data, I found that an identity validation API really streamlined my process. It helped me keep my data organized and accurate.