how to compare a list in tmap

One Star

how to compare a list in tmap

I have a scenario where I am comparing column A with a list of constant numbers, which is easily possible in SQL using IN statement like
CASE WHEN A IN (1,2,3,4,5,16,20,65) THEN 1 ELSE 0 END
I am trying to implement the same in Talend's Tmap component but I have no idea how to do this.Please help.
Thanks,
Shail
Six Stars

Re: how to compare a list in tmap

Hi Shail,
you can do it with a common lookup in tMap component.
Use tRowGenerator to create a flow, fixed with elements, those you want search in.
Than use this flow as a standard lookup (inner or outer) in tMap.
May help
Bye

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 2

Part 2 of a series on Context Variables

Blog

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