conditional component run

Highlighted
Six Stars

conditional component run

Hi,

 

I want to execute component only if previous component have rows more than 'n' 

 

how to achieve this where condition can be on count of rows processed in link from previous component ?


Accepted Solutions
Employee

Re: conditional component run

Hi,

 

    I am talking about tMap numeric sequence.

image.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

View solution in original post


All Replies
Employee

Re: conditional component run

Hi,

 

    The best way is to validate the value of NB_LINE parameter of the main flow like below (using Control+Space to get all available variables).

 

 

image.png

 

Another small trick is to add a numeric sequence to the input flow and map the value to a context variable. Once the last row s also processed, use the value loaded in that context variable to measure the number of rows.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Six Stars

Re: conditional component run

Hi @nikhilthampi 

 

#1 NB_LINE parameter - I tried control+space by selecting component and by selecting link but it is not working out. I will get message as "Properties not available"

 

#2 add a numeric sequence -- Here you may need to give me more details, please. Are you referring "Numeric" routine ? or is it something in Tmap ?

Employee

Re: conditional component run

Hi,

 

    I am talking about tMap numeric sequence.

image.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

View solution in original post

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