Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rwnetwork
Creator
Creator

Tfilter advanced mode - java.lang.NullPointerException

Hi all,

I've officially hit the point where I don't have any more ideas in trying to figure my tfilter advanced mode syntax and looking to the community to help me out in getting this accurate.

I have 3 conditions that are working fine, however, I learned that I have to add more.

My current conditions are this:

(input_row.FROMNAME != null ) || (input_row.TONAME != null ) || !(input_row.DESCRIPTION.isEmpty())

Therefore, I'm accurately filtering out the nulls for FROMNAME and TONAME and then blanks for DESCRIPTION.

 

Here is my job design, it does have a tExtractJSON component that a colleague worked on for this job.

https://www.screencast.com/t/7By21UZ9Jhlr

 

I have 3 rows left in my data set that I have to also filter out.  The snapshot link below are the 3 rows that have to be filtered out.

https://www.screencast.com/t/hiBDnSxI

 

I tried adding more conditions to my existing tfilter advanced mode, but I'm getting the good ol' ...' java.lang.NullPointerException' error.  All indications show that the FROMNAME and TONAME are blank strings.  

 

Can anyone provide the java syntax to remove these 3 rows? 

Or provide any more suggestions on additional steps to take to make sure that my FROMMANE and TONAME values are blank strings?

 

Please anyone help to shed any light that you can so I can get on with my life.  ha!

Thanks much!

Michelle

 

 

 

 

Labels (4)
11 Replies
Anonymous
Not applicable

You said you are trying to add more condition, what is the condition that cause the NullPointerException?
rwnetwork
Creator
Creator
Author

Hi there shong, 

Thanks for reach out, I guess I should have included that part in my post.

 

Here are the conditions I am trying to add in the advanced mode in tfitler:

 

||

!(input_row.FROMNAME.isEmpty())

||
!(input_row.TONAME.isEmpty())

 

So trying to add 2 more conditions to remove those blank fields for the FROMNAME and the TONAME.

 

 

 

Anonymous
Not applicable

Your filtering is not correct. You say....

 

"I have 3 conditions that are working fine, however, I learned that I have to add more.

My current conditions are this:

(input_row.FROMNAME != null ) || (input_row.TONAME != null ) || !(input_row.DESCRIPTION.isEmpty())

Therefore, I'm accurately filtering out the nulls for FROMNAME and TONAME and then blanks for DESCRIPTION"

 

You are using an OR operator. So this condition will be met if FROMNAME is not null OR TONAME is not null OR DESCRIPTION is empty (should also be not null). I think you need to use the AND operator (&&)

rwnetwork
Creator
Creator
Author

Thanks rhall, 

I have also tried the && operator, but I've tried so many different iterations, that I may have lost track.

Let me play with that and see if I can get my final extract as expected.

Thanks for the reply!.

Michelle

 

Anonymous
Not applicable

Also try changing the DESCRIPTION filter to !=null

rwnetwork
Creator
Creator
Author

Ok will do thank you.  0683p000009MACJ.png

Aravind_Ravi
Contributor III
Contributor III

Try like this

 

((!Relational.ISNULL(input_row.FROMNAME)) || (!Relational.ISNULL(input_row.TONAME))|| (!(Relational.ISNULL(input_row.DESCRIPTION) || input_row.DESCRIPTION.equals(""))))

 

If this is what you are looking for then, Press the "Accept as Solution " Button.

Thanks,
AR

rwnetwork
Creator
Creator
Author

Thanks for the suggestion, but I'm still getting the 3 blank rows.

Anonymous
Not applicable

Hi,

 

     Did you check whether the incoming data is null or empty string? I guess your incoming data is coming as empty string.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved