'How to perform parameterized date comparison with Azure Data Factory mapping data flows?

In mapping data flows I'm using the following filter expression against a late binding (schema drift) source:

toString(byName('modifiedon'))  > '2022-04-19 00:00:00'

The filter expression returns the correct output. However I run into problems when I attempt to parameterize the expression using the following parameters:

enter image description here

For example, let's replace 'modifiedon' with a string type parameter as shown below:

toString(byName($WatermarkColumnName))  > '2022-04-19 00:00:00'

This will give me no output at all. If I try to parameterize the timestamp with a string type parameter I'll get the following error message when attempting data preview:

Incompatible data types between declared type and actual parameter value

I have tried defining the WatermarkValue parameter as TimeStamp and then using toString($WatermakValue) function in the filter expression but then it returns all records instead!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source