API and limit requests every tot seconds

Four Stars

API and limit requests every tot seconds

Hello!

I'm new on Talend, and I'm new in this community. 

 

Nice to meet you all!!

 

I have an issue I would like to figure it out.

 

I'm using a tHttpRequest to call an API and collect some Json datas. The problem is that I can make a limited number of requests and then I have to wait 10-15 seconds, or the API will stops me.

Is it possible to schedule an API request every #seconds?

 

Thanks a lot!!

Smiley Happy

 

Sixteen Stars TRF
Sixteen Stars

Re: API and limit requests every tot seconds

Hi,
You may start your job every x seconds depending on your scheduler capability to go under the minute or you can build an infinite loop in your job (probably with a clean exit door to be defined) and have a tSleep component to manage the desired delay between 2 API calls.
Hope this help.

TRF
Four Stars

Re: API and limit requests every tot seconds

Hello TRF,

 

thanks a lot! 

 

I've solved the issue by using the tSleep you suggested to me plus the component tLoop, to iterate the scheduled tSleep.

I attach a screen of the Job flow.

 

Tnx!

Smiley Happy

2019 GARTNER 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

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog