Talend MDM Views (Filter records using WHERE conditions)

Highlighted
Five 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.
Five Stars

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

It is Talend 6.1

 

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

 

Thanks,

Prajwala

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog