Search code examples
talend

How to reduce throughput in Talend?


I am trying to reduce the throughput to 3 rows/s. I tried searching for this online but didn't find much. Can anybody help?

My current job looks like this:

Job layout

Or is it possible to limit tHTTPRequests in the component?


Solution

  • For this you will want to use the tSleep component that will introduce a wait time per row.

    The wait time is in seconds but you might be able to use a floating point value (eg. 0.3333). Otherwise you'll be limited to 1 row/s.

    If you can't use a floating point value in the tSleep configuration and you absolutely need 3 rows per second then you could use a tJavaRow component that passes everything in the input to the output but also uses this snippet of Java code:

    Thread.sleep(333);
    

    This will sleep the running thread for 333 milliseconds on each row of data being passed through the component and give you roughly 3 rows per second (minus actual processing time which in this case should be minimal).