Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Joins on Double or Float are not recommended due to rounding error.

jasmine6
5 - Atom

Is it possible to join two data sets of double data type or do i need to change the data type (will this make my data less accurate if it limits data range?)

 

thanks for the help

2 REPLIES 2
rzdodson
12 - Quasar

It's possible, but it is not recommended as numeric fields often contain decimal values and the like and you may run in to instances where you round prior to executing that join and you create mismatches/improper joins throughout your data set.

 

What I would recommend instead is either converting the Double field to a text string (V_WString, V_String, etc.) in both tables before doing a Join; or, you can insert a RecordID tool in both data streams, change the ReccordID field to a string inside its tool configuration, and then join on that field.

ed_hayter
12 - Quasar

It is absolutely possible to join on doubles - it is simply a warning that you might not get the output you are expecting if cases do not match due to rounding error with how numbers are stored by a computer

 

https://en.wikipedia.org/wiki/Double-precision_floating-point_format

 

The warning is just encouraging you to think about your circumstance: can you round your data to a specific level of precision before the join that meets your requirement so that you can control whether the cases you want to match do and avoid cases dropping out that you wouldnt like to drop out?

Labels
Top Solution Authors