我尝试将CSV文件中的数据上传到我创建的空表中。但是得到了以下错误:
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.
这是我的fastload.xml文件:
<!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>
这是我的连接网址:
url=jdbc:teradata://mypath/TMODE=ANSI,CHARSET=UTF8,TYPE=FASTLOAD
不使用FASTLOAD上传适用于同一文件。 我试图谷歌错误消息,但没有找到任何东西。任何人都知道这里的问题是什么?感谢。