run if

Four Stars

run if

hi, 

i have this job Capture.PNGand i have this resultCapture1.PNG

 

 

and i want to send mail if he see "A" in the last column, but here he just takes the last line in the last column ( it's "B") and the answerof the run if is "B".

Thanks for your answer Smiley Very Happy

Community Manager

Re: run if

 
Community Manager

Re: run if

Use a tFlowToIterate after the tLogRow. Then connect that to a tJava using an iterate link. After the tJava, use your RunIf. The RunIf logic should be based on a globalMap value. This is because the tFlowToIterate component will convert your data row to globalMap values. The key to each column will be the row name feeding into the globalMap and the column name. So, if your column is a String and is called "MyValue" and your row is called "row3", your globalMap value will be accessed like below....

 

((String)globalMap.get("row3.MyValue"))

Your previous method did not work as the RunIf fires after the component has finished. By adding the tFlowToIterate, it means the subsequent components both start and end with each iteration. This means your RunIf will be tested for every row.

Four Stars

Re: run if

@rhall_2_0  we use that in tJava?

((String)globalMap.get("row3.MyValue"))

 

 

Highlighted
Community Manager

Re: run if

No, the tJava should be left empty. The globalMap code I gave you simply shows you how to access the column value for your RunIf logic.

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

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now