Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error converting float to double

Hello,

 

I am trying to convert my float fields to double fields on the tMap for conversion.   I am getting the error: cannote invoke doubleValue() on the prmitive type float.  Here is what I am writing in the tMap.

 

row1.HOME.doubleValue()

 

I am converting big decimals using the same syntax and that seems to be working.  Do I need to handle floats differently?

 

thanks!

 

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Check the schema for row1. I suspect that HOME does not have the "nullable" tick box ticked. This means that it cannot be null and is therefore a primitive type. You need it to be an instance of the Float class. Just tick the "nullable" tick box and that should resolve this.

akumar2301
Specialist II
Specialist II

Double.valueOf(row1.HOME.toString())

Anonymous
Not applicable
Author