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: 
prajwalagurram
Partner - Contributor
Partner - Contributor

Talend MDM Views (Filter records using WHERE conditions)

Scenario: I have a customer record with fields Effective_From, Effective_To and Current Dates.

I will have to create a new View in Talend MDM so that only the records having the Current between the Effective_From, Effective_To dates are displayed.

 

Trail 1

I tried adding in the where condition, but it doesn’t let me compare the date values as the comparison is limited to String and Int.

So we have added new fields called FromDate, ToDate and CurrentDate which are Long values storing the milliseconds data. And even after doing this, it doesn’t allow me to do a field to field comparison.

 

WHERE CONDITIONS in View

Customer/From_Date <= Customer/Current_Date And

Customer/To_Date >= Customer/Current_Date

 

Caused by: com.amalto.core.util.CoreException: org.apache.commons.lang.NotImplementedException: '>=' support not implemented for field to field comparison.

               ... 77 more

Caused by: org.apache.commons.lang.NotImplementedException: '>=' support not implemented for field to field comparison.

               at com.amalto.core.query.user.UserQueryHelper.buildCondition(Unknown Source)

               at com.amalto.core.query.user.UserQueryHelper.buildCondition(Unknown Source)

               at com.amalto.core.delegator.IItemCtrlDelegator.viewSearch(Unknown Source)

               at com.amalto.core.server.DefaultItem.viewSearch(Unknown Source)

 

Trial 2

I tried converting into number and implementing but still no luck.

WHERE CONDITIONS in View

Customer/From_Date <= number(translate(Customer/Current_Date)) And

Customer/To_Date >= number(translate(Customer/Current_Date))

 

2019-03-01 11:49:56,288 WARN  [com.amalto.core.delegator.impl.DefaultLocalUserDelegator] All values have been evicted from cache

2019-03-01 11:49:57,085 INFO  [com.amalto.core.storage.datasource.DataSourceFactory] Reading from datasource file at 'C:\Talend\6.1.1\mdm\conf\datasources.xml'.

2019-03-01 11:49:57,303 INFO  [com.amalto.core.storage.datasource.DataSourceFactory] Reading from datasource file at 'C:\Talend\6.1.1\mdm\conf\datasources.xml'.

2019-03-01 11:50:01,967 WARN  [com.amalto.core.query.user.UserQueryHelper] Skip 'From_Date' because it can't accept value 'number(translate(Customer/Current_Date))'

2019-03-01 11:50:01,969 WARN  [com.amalto.core.query.user.UserQueryHelper] Skip 'To_Date' because it can't accept value 'number(translate(Customer/Current_Date))'

 

What could be the possible scenario here ?

Any help will be appreciated. Thank you

Labels (3)
2 Replies
Anonymous
Not applicable

Hello,

Could you please clarify in which Talend version/edition you are?

Best regards

Sabrina

prajwalagurram
Partner - Contributor
Partner - Contributor
Author

It is Talend 6.1

 

I have checked with the Talend guys, and looks like this functionality can't be done.

 

Thanks,

Prajwala