Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
@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/
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)