1

I am trying to apply a filter

Date_Received>= toDate(date_to_epoch(now())-(31556926))

in filter transformation in Einstein dataflow.

toDate(date_to_epoch(now())-(31556926)) is giving the expected output

2018-12-31 06:03:36

But I am getting the below error while executing dataflow:

Something went wrong while executing the filter:Date_Received_one_year node: Incompatible types: STRING and DATE in 'Date_Received' >= |2018-12-31 06:03:36 (02K0r0000009ZcIEAU_03C0r000000HMRSEA4)

Any help will be highly appreciated

1
  • Based on the error, it sounds like "Date_Received" is a string whereas the other half of the compare is a date. If you add toDate(Date_Received) to the beginning does it work? – Kris Goncalves Dec 31 '19 at 13:46
2

You cannot use a function within a filter Transformation.

To achieve that, you have to use a computeExpression and generate a new field (for example dateFilter -> toDate(date_to_epoch(now())-(31556926)) ) Then use that dateFilter Field to filter out rows. I have struggled with that many times. Some error texts in Salesforce are pretty misleading IMHO

After the filter you can slice that field if you don't need it anymore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.