Cannot flush cache error when uploading data with scriptella to Teradata using FASTLOAD

889 Views Asked by At

I tried to upload data in a CSV file to an empty table I created. But got the following error:

May 21, 2014 10:18:18 AM <INFO> Execution Progress.Initializing properties: 1%
May 21, 2014 10:18:18 AM <INFO> Execution Progress.Initialized connection id=in_file, CsvConnection, Dialect{CSV 1.0}, properties {}: 3%
May 21, 2014 10:18:19 AM <INFO> Execution Progress.Initialized connection id=db, JdbcConnection{com.teradata.jdbc.jdk6.JDK6_FastLoadManager_Connection}, Dialect{Teradata Teradata Database 13.10.07.24}, properties {statement.batchSize=100000}: 5%
May 21, 2014 10:18:19 AM <INFO> Execution Progress./etl/query[1] prepared: 10%
May 21, 2014 10:18:19 AM <INFO> Registered JMX mbean: scriptella:type=etl,url="file:/xxx/fastload.xml"
May 21, 2014 10:18:44 AM <INFO> Execution Progress./etl/query[1] executed: 95%
May 21, 2014 10:18:44 AM <INFO> Execution Progress.Complete
May 21, 2014 10:18:55 AM <WARNING> Unable to rollback transaction for connection CsvConnection: Transactions are not supported by CsvConnection
May 21, 2014 10:18:55 AM <SEVERE> Script /xxx/fastload.xml execution failed.
Unable to commit transaction - cannot flush cache
JDBC provider exception: Unable to commit transaction - cannot flush cache
Error codes: [HY000, 1154]
Driver exception: java.sql.BatchUpdateException: [Teradata JDBC Driver] [TeraJDBC 14.10.00.17] [Error 1154] [SQLState HY000] A failure occurred while inserting the batch of rows destined for database table "mydatabase"."myemptytable". Details of the failure can be found in the exception chain that is accessible with getNextException.

This is my fastload.xml file:

<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
<description>Scriptella  script</description>
<properties>
    <include href="$config"/> <!--Load from external properties file-->
</properties>
<connection id="in_file" driver="csv" url="$inputfile">
</connection>
<connection id="db" driver="$driver" url="$url" user="$user" password="$password" classpath="lib/terajdbc4.jar">
statement.batchSize=100000
</connection>

<query connection-id="in_file">
<!-- Empty query means select all columns -->
<script connection-id="db">
INSERT INTO  mydatabase.myemptytable VALUES (?1,?2,?3);
</script>
</query>

</etl>

This is my connection URL:

url=jdbc:teradata://mypath/TMODE=ANSI,CHARSET=UTF8,TYPE=FASTLOAD

Uploading without FASTLOAD works for the same file. I tried to google the error message but did not find anything. Anyone know what's the problem here? Thanks.

0

There are 0 best solutions below