JDBC FastLoadCSV truncate data

Database

JDBC FastLoadCSV truncate data

Hi,

I'm using JDBC FastLoad to load CSV files in my database. It's work fine. But when the column length in csv file is greater that column lenght in the table, line is not loaded. Is there any option to setup to allow JDBC FastloadCSV process to load the line by trancating the data.

Thank you.

 

Regards,

NKI.

3 REPLIES
Teradata Employee

Re: JDBC FastLoadCSV truncate data

No, there is no option in JDBC FastLoad CSV to truncate data.

 

All rows with problematic data values are placed into Error Table 1 by the Teradata Database.

 

Your application is responsible for dealing with the rows placed into Error Table 1.

 

If you want the data to be truncated, then you can program your application to retrieve the rows from Error Table 1, truncate the data, and then load the truncated data.

Re: JDBC FastLoadCSV truncate data

Hi Tomnolan,

Thank you for your replay.

It's so strange ! FastLoad utility trancate the data and load it without problem.

 

For Error table 1, I'm not able to use it. Do you have any idea or exemple.

 

Regards,

NKI.

Teradata Employee

Re: JDBC FastLoadCSV truncate data

RE: For Error table 1, I'm not able to use it. Do you have any idea or exemple.

Yes, we have an example of how you can select from FastLoad error table 1 and 2. You can find this example in our Teradata JDBC Driver User Guide under Sample Programs. Look for T20208JD.java Insert data into a table using FastLoad CSV with one CSV file.

 

Regards,

Andreas