Skip to main content
Open

ChangeDetector alternate comparison of decimal and datetime values

Related products:Transformers
  • March 23, 2020
  • 1 reply
  • 67 views

burgasser
Contributor
Forum|alt.badge.img+5

When using the ChangeDetector to compare attribute values, decimal and datetime values create false-positives due to precision (i.e. 10.00 vs. 10.0001). Perhaps comparison of decimal values could be done via abs(value1 - value2) > epsilon. The user could enter the epsilon value. Dates vs. DateTimes could be handled similarly.

1 reply

kketola
Contributor
Forum|alt.badge.img+13
  • Contributor
  • January 17, 2025

Was just pulling my hair out with this today. It wasn’t a matter of close precision like the post but I inserted into SQL Server from an Oracle dataset and because of differences in how the data was represented by each vendor, it wouldn’t match. 25.8 <> 25.80000000 according to ChangeDetector but was flagged as a duplicate by DuplicateFilter.

I ended up using a regex replace in an attribute manager to trim trailing 0s, but more control over decimal and datetime matching is worth an upvote!