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


All Replies
Highlighted
Fifteen Stars TRF
Fifteen 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
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.

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

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

Downloads and Trials

Test drive Talend's enterprise products.

Downloads