Filter on empty field in tmap

Seven Stars

Filter on empty field in tmap

Hello,

I have a .dbf file that contains an empty line (the fields are empty) I would like to filter this line. I used the filter expressions but it dosen't work.

vide.PNGCapture.PNG

Also i tried with isEmpty() ----

!row1.DATE_NDX.isEmpty() && !row1.TIME_H.isEmpty() && !row1.TIME_M.isEmpty()

But the same problem.

Although I have already checked the box "ignore null as the source data" before tmap 

Capture.PNG

Thank you in advance.


Accepted Solutions
Highlighted
Seven Stars

Re: Filter on empty field in tmap

Thanks for your replay. Here is the expression wich resolved my problem 

row1.DATE_NDX != null &&
!row1.DATE_NDX.equals("0") &&
row1.TIME_H != null &&
!row1.TIME_H.equals("0") &&
row1.TIME_M != null &&
!row1.TIME_M.equals("0")

 

Best regards.

View solution in original post


All Replies
Sixteen Stars TRF
Sixteen Stars

Re: Filter on empty field in tmap

Did you try this:
row1.DATE_NDX != null &&
!row1.DATE_NDX.equals("") &&
row1.TIME_H != null &&
!row1.TIME_H.equals("") &&
row1.TIME_M != null &&
!row1.TIME_M.equals("")

Else, get the source code line number from exception message, then go to code tab and check the operation which crash the job.

TRF
Highlighted
Seven Stars

Re: Filter on empty field in tmap

Thanks for your replay. Here is the expression wich resolved my problem 

row1.DATE_NDX != null &&
!row1.DATE_NDX.equals("0") &&
row1.TIME_H != null &&
!row1.TIME_H.equals("0") &&
row1.TIME_M != null &&
!row1.TIME_M.equals("0")

 

Best regards.

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