2
我想使用Teradata的Fastload腳本將我的CSV文件導入Teradata。 我也嘗試添加一個自動增量列。 這是我的CSV文件:Teradata創建表自動增加列錯誤
Word,country,sale,week
hi,USA,26.17,11/22/15-11/28/15
bye,USA,16.5,11/22/15-11/28/15
代碼片段
String tableName = "my_db.mytable";
String createTable = "CREATE TABLE " + tableName + "," +
"NO FALLBACK," +
"NO BEFORE JOURNAL," +
"NO AFTER JOURNAL," +
"CHECKSUM = DEFAULT" +
"(" +
" id decimal(10,0) NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 NO CYCLE),"+
" word VARCHAR(500) CHARACTER SET UNICODE," +
" country VARCHAR(50)," +
" sale FLOAT," +
" week VARCHAR(30)" +
") " +
"PRIMARY INDEX (id)";
// INSERT statement
String insertTable = "INSERT INTO " + tableName + " VALUES(?,?,?,?,?)";
錯誤,我得到:
Row 1 in FastLoad table my_db.mytable_ERR_1 contains the following data:
ErrorCode=2673
ErrorFieldName=F_id
ActualDataParcelLength=55
DataParcel: byte array length 55 (0x37), offset 0 (0x0), dump length 55 (0x37)