Filtering in tmap

Six Stars

Filtering in tmap

Hello All,

Im trying to filter two columns ORGANIZATION_ID and TRANSACTION_SOURCE_TYPE_ID in my job and below is the expression I used in TMAP. 

 

Not sure why but the job is not loading any records to the target table. Please correct me if im missing anything in the way I used the expression in TMAP.

2.PNG3.PNG

Thank You


Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: Filtering in tmap

"&&" is for "and". For "or" use "||" as ORGANIZATION_ID cannot be equals to 116, 117, ... at the same time!

The answer is

(Source1.ORGANIZATION_ID.equals("116") || Source1.ORGANIZATION_ID.equals("117") || ...) && 
Source1.TRANSACTION_SOURCE_TYPE_ID.equals("25")

TRF

All Replies
Fifteen Stars TRF
Fifteen Stars

Re: Filtering in tmap

"&&" is for "and". For "or" use "||" as ORGANIZATION_ID cannot be equals to 116, 117, ... at the same time!

The answer is

(Source1.ORGANIZATION_ID.equals("116") || Source1.ORGANIZATION_ID.equals("117") || ...) && 
Source1.TRANSACTION_SOURCE_TYPE_ID.equals("25")

TRF
Six Stars

Re: Filtering in tmap

Thank You. That worked.

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

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

Download