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: 
pawe84
Creator
Creator

Can not parse value for column, NULL values are allowed, datatype=short

Hi everyone

I have an issue reading my tFileInputDelimited component.

I have a field called agent_id, data type= short and NULL values are allowed.
I created a temp file and stored my values there.

Now if I want to read this file I'll get this error:

Couldn't parse value for column 'I_ID_AGENT' in 'row2', value is '0.00'. Details: java.lang.NumberFormatException: For input string: "0.00"

In this case my dataset has NULL values in I_ID_AGENT.

Why talend says value is 0.00 if NULL is allowed and data type is short??

 

Thanks for any advice.

Labels (2)
2 Replies
manodwhb
Champion II
Champion II

@pawe84 , 

short: The short data type is a 16-bit signed two’s complement integer. It has a minimum value of -32,768 and a maximum value of 32,767 (inclusive). As with byte, the same guidelines apply: you can use a short to save memory in large arrays, in situations where the memory savings actually matters.

 

check the below links o know more about data types.

https://help.talend.com/reader/qQd5JCSfrp3wHqpPJnwnKA/daNJOSUBT16LM6iMe5Ntaw

 

https://talendweb.wordpress.com/2017/04/26/talend-data-types/

tnewbie
Creator II
Creator II

You can define the id column as string in your source schema definition and then explicitly convert that column to short after ensuring it is not null...example

 

(ID == null )?null:short.parseShort(ID)