NOT EQUAL on a string type filter is not working inside tmap output

Six Stars

NOT EQUAL on a string type filter is not working inside tmap output

I am facing a very strange situation inside tmap output filter. I have implemented a not equal filter in tmap but it is still passing the data.

 

The filter I am using is: Var.Flag==0 && !Var.Type.equals("ON2222")

 

But it is still passing the value ON2222 . I also tried with only  !Var.Type.equals("ON2222") filter but it was still passing the value. 

For the input, I hardcoded the value ON2222 as a string. I have attached the tmap picture.

I would like to know what wrong I am doing?


Accepted Solutions
Six Stars

Re: NOT EQUAL on a string type filter is not working inside tmap output

Thanks a lot for advice. I found the solution and its something new to me. My code is correct but inside the tmap the output component was minimize because of that the filter was disable. After I extend the tmap output is was working fine.

View solution in original post


All Replies
Six Stars

Re: NOT EQUAL on a string type filter is not working inside tmap output

Hello,

 

Not sure if this can help you, but instead of creating filter by hands, you can use tFilter component and used it as follow :

job_filter_rows.png

You can filter after or before your tMap component by using the row "Filter"

inside_filter_row.png

Using operators "is equal to" and "is not equal to".

Maybe you can use this component to debug and try to filter the rows you want ; or using the advanced mode to debug properly by adding your code which is currently in you tMap.

 

Hope this helps !

~Regards, jeoste
Kudos are always appreciated ; mark the topic as resolved if query is answered for the community
Six Stars

Re: NOT EQUAL on a string type filter is not working inside tmap output

Thanks a lot for advice. I found the solution and its something new to me. My code is correct but inside the tmap the output component was minimize because of that the filter was disable. After I extend the tmap output is was working fine.

View solution in original post

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 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