tfilterrow and tmap filter problems

One Star

tfilterrow and tmap filter problems

Hello,
as you can see in my attached pics I united some tables. These tables I wanted to filter with tfilterrow and there the first problem occurred. I just wanted to get all rows where the Input Column "Idx_1" (=datatype string) is not empty. As you can see in the attached tfilterrow pic I realised that through the shown criteria but I do not unterstand why I have to use the "reject-ouput" and not the "main-output" if I want to get all the rows where "Idx_1" is not "". And the strange thing in my eyes is: When I change the operator from != to == nothing gets filtered. All 3913 rows run through. Should that not be the opposite from != (this has been 3516 rows and that's why it should be 397 and not all 3913 rows, to my mind).

and the next point I do not unterstand is, why the filter in tmap does not work. I wanted to get all rows with the VERSICHERTEN_ID =="6800E6684835F7E15E24A591C6DCFD1E". I copied this ID directly from the input data in the tmap filter but it shows 0 rows in the output. It should be 1 row.
Has anyone any explanations or help for these problems?
Thank you!!
Alex
Seventeen Stars

Re: tfilterrow and tmap filter problems

hi,
for comparison String (in java ) use method equals
... that represents the same sequence of characters ..

hope it solve your problem
++
One Star

Re: tfilterrow and tmap filter problems

Hi,
thank you for your answer. I have pretty no knowledge in java. How can I use this? Whats the correct syntax?
row4.VERSICHERTEN_ID equals("6800E6684835F7E15E24A591C6DCFD1E")?
or
row4.VERSICHERTEN_ID equals(6800E6684835F7E15E24A591C6DCFD1E)

none of this works!
Seventeen Stars

Re: tfilterrow and tmap filter problems

supposed that row4.VERSICHERTEN_ID is an String Object, you use it like a method of any other object :
...
row4.VERSICHERTEN_ID.equals("6800E6684835F7E15E24A591C6DCFD1E")
// you compare 2 Strings (in java a String is an object and for a literal it's always between double quote

this method return boolean (true or false) @see doc
++
One Star

Re: tfilterrow and tmap filter problems

now its clear. Thank you very much.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

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