If condition statement

One Star

If condition statement

Hi,
Is there a way to perform If and else statement in Talend?
for example, I'm writing an ETL and I would like to perform the following operations:
if (validation == true)
execute job A
else
execute job B
Thanks
One Star

Re: If condition statement

Hi
You can right click on your subjob or any components, choose 'Trigger->Run if'.
Then set condition of 'Run if'.
Best regards!
Pedro
One Star mpa
One Star

Re: If condition statement

alphamanic,
If it's an if..else.. statement to decide what output you put in a column you can use the following:
if (validation == true)
execute job A
else
execute job B
The part in front of the "?" is your if statement, the part between "?" and ":" is your condition if your IF condition is true. The part after ":" is your else statement.
( Validation == true) ? Execute job A : Execute job B

If it's to execute a job you can use what Pedro suggested.
Regards

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