Hello,
I have the following configuration :
Talend Data Integration V5.6RC
1 firebird dabase with 1 table
I am testing the following job:
update the data of the table A by the data of the same table:
the output table is defined as:
When I execute the job, I get the following error:
Exception in component tFirebirdOutput_1
java.sql.DataTruncation: Data truncation
at org.firebirdsql.jdbc.field.FBWorkaroundStringField.setString(FBWorkaroundStringField.java:97)
at org.firebirdsql.jdbc.AbstractPreparedStatement.setString(AbstractPreparedStatement.java:384)
at pmi.test2_0_1.test2.tFirebirdInput_1Process(test2.java:9374)
at pmi.test2_0_1.test2.runJobInTOS(test2.java:11152)
at pmi.test2_0_1.test2.main(test2.java:11011)
Why I have this error if I have the SAME table on the both side?
Thanks
Didier
Hi Dihonore
Data truncation error usually comes when you define inconsistent length of your columns in your input and output.Make sure length of each column is atleast same in both input and output.
For more clarification suppose your input column "name" has length 20 and output column "name" has length 10,then it will truncate any name coming from input of length greater than 10.
Hope it helps
Thanks
hi,
check that you have explicitely put length to your column in your flow .
When length are not specified a dafault value is using at creation table.
regards
laurent
ps : crossing post
I agree but the output table is the input table There is only one table!! So there is only one data structure. So the length cannot be different in the output table compared to the input table!
Talend guess attributes of a column on the 50th lines. I think that you have data longer thant those detected by talend. Profile your data to find 'real length'. regards
Hi
You are inserting data in the same table(both table are same).Then it depends what operation you are performing on your table such as insert,update,delete or you just trying to append.Do one thing select delete option when you are inserting data to your target table.It will first delete data from your table and then will insert.If you will be trying to append data in target table then it will give truncation error as you are adding same value two time into your column (one already present,one using job),so it might be crossing your length limit.
Hope it helps
Sanjay TIwari
Hi,
You can use "Rejects" row from tFirebirdOutput to see what's the truncated data.
Please see a related KB article:
TalendHelpCenterata too long for column Best regards
Sabrina