choose when a lookup occurs in tMap

Four Stars

choose when a lookup occurs in tMap

Hi, I have a job that is distributed as follows, a tFixedFlowInput as input to tMap, and a tRunJob connected as lookUp to it. As an output I have a tLogRow just to see the output.
The idea is to decide in the tMap for some incoming record if the job of the tRunJob should be run or not, is this possible?

thanks in advance
Juan

Community Manager

Re: choose when a lookup occurs in tMap

Yes and no. You just have to do it in a different way. The easy way is to use another tMap and output to two paths; one for data requiring a lookup, another for data that doesn't require a lookup. Then use your lookup tMap for the flow requiring a lookup and the other path can go wherever else you need it to go. If you need to group the data together again, output your two paths to linked tHashOut components. Then in another subjob, read the data in using a tHashInput.

 

You can also do something a bit more complicated with a single tMap using the "Reload at each row" Lookup Model. Take a look at the tMap documentation to discover this very useful functionality. But since I am guessing you are new to this, I would start with my first suggestion.

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch