Talend MDM Views (Filter records using WHERE conditions)

Highlighted
Four Stars

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

Moderator

Re: Talend MDM Views (Filter records using WHERE conditions)

Hello,

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

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download