SSIS: Cannot map the lookup column because the column is set to a floating point data type
Asked Answered
B

1

2

Even though I have defined float type, I still can't map. I got this error:

enter image description here

Cannot map the lookup column, 'vertical_rate', because the column is set to a floating point data type.

Bummer answered 8/5, 2022 at 3:47 Comment(2)
What are the types of the columns in the source and the destination ?Carney
float will never match. A value of 1 is often rendered as 1.000000000001 or .99999999997. If you have to use float and you are trying to use these columns to join, you may want to round and change your data type.Florey
G
2

According to the Microsoft documentation on the Lookup transformation (https://learn.microsoft.com/en-us/sql/integration-services/data-flow/transformations/lookup-transformation?view=sql-server-ver16), you cannot use the floating-point data type (DT_R8, which is a double-precision floating-point value) to do a Lookup:

The transformation supports join columns with any data type, except for DT_R4, DT_R8, DT_TEXT, DT_NTEXT, or DT_IMAGE. For more information, see Integration Services Data Types.

This is because, as @KeithL correctly points out, floating point is not exact. If the reference dataset uses floating point, then you must first change the data type there first. Then use a compatible data type for the matching input field used to join.

Georgiageorgian answered 11/8, 2022 at 21:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.