Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tfilterrow help to build criteria null values and records past certain dates

I'm trying to filter so we are only including rows where in a column there's null values and in another column we are only loading past a certain date. so far I have this but getting an error:

 

Currently in advanced mode in tfilterrow: 

Relational.ISNULL(input_row.EVENT_ID)==true && (input_row.SERVICE_DT>=TalendDate.parseDate("dd-MM-yyyy","01-07-2017"))

 

error:

0683p000009M8lv.png

Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi,

 

   Please remove ==true from the condition. You do not have to check the boolean value in a if condition. It will be automatically checked.

0683p000009M81y.png

Similarly, you need to use the date difference function or compareDate function to compare dates

 

0683p000009M8KQ.png

 

 

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

Anonymous
Not applicable
Author

Thanks nikhilthampi can you help me with how the date should work? 

 

I tried this:

Relational.ISNULL(input_row.EVENT_ID) && TalendDate.compareDate(input_row.SERVICE_DT,(TalendDate.parseDate("dd-MM-yyyy","01-07-2017")),>="01-07-2017")

 

still got this error: 

0683p000009M8L4.png

Anonymous
Not applicable
Author

Hi,

 

   You are not using compare date function according to its syntax. Please refer the tMap documentation for this function. It will compare two dates and give the results as a number. You need to compare that number to check whether first date is greater than second date. You need to remove the >= symbol in your syntax. There are lot of examples for about the usage of this function in Talend community.

 

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