Convert types with null values

One Star

Convert types with null values

Hi,
I have an excel file which I need to load in a MSSQL table.
To do so I have defined an excel schema with all columns as string(1023), I then use the component tConvertType and load it to the table. The schema of convertType is the same as the table, which means that my schema is typed (numeric...), all the schema allow null values.
In the excel input component I have checked : trim all columns.
In the ConvertType I checked :
- Auto Cast
- Set empty values to Null before converting
When I run the job lines with null values go to the reject flow. I don't understand this, why converting a null string to a null big decimal fails ? Am I using the wrong component ?
Update : My fault, it is working, I haven't seen but the problem was caused by #N/A.
One question, the fact that the reject doesn't contain the input row values, and was saying variable:null is quite annoying, is it possible to see the original values in the reject, to be able to understand why the conversion fail ?
Community Manager

Re: Convert types with null values

What is the error message? It should show something as below, it contains the real value in the column.
newColumn:For input string: "na12" - Line: 3
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Convert types with null values

No it doesn't. My excel file has a column with numbers formatted with a comma as the delimiter for thousands (I load everything as string) . the error I get when I am try to convert the string 2,454.05451547 to big decimal (20,10) is :
PortTotalReturn:null - Line: 24
Community Manager

Re: Convert types with null values

Hi 
I tested and got the same issue, can you please report a jira issue on our bugtracker? As a workaround, you can use tMap to convert the data type from string to BigDecimal, and get the reject lines, see

Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business