2016-08-16 38 views
0

我正在嘗試sqoop執行從Teradata DB到Hive的增量導入。下面是查詢:增量「lastmodified」在sqoop中不工作

sqoop import --connect jdbc:teradata://xxx.xxx.x.xx/DATABASE=DBN --driver com.teradata.jdbc.TeraDriver --username userN --password pass --query "SELECT alias.colA, alias.call_date, alias.colB, alias.colC FROM tableName alias where \$CONDITIONS" --target-dir /apps/hive/warehouse/staging.db/tableName -m 26 --check-column call_date --incremental append --split-by alias.colA --last-value '2016-02-01' 

列call_date是日期型,格式 'YYYY-MM-DD' 的值。

當我使用'append'--incremental,一切工作正常。但是,當我把'lastmodified',下面的錯誤被拋出:

ERROR util.SqlTypeMap: It seems like you are looking up a column that does not 
ERROR util.SqlTypeMap: exist in the table. Please ensure that you've specified 
ERROR util.SqlTypeMap: correct column names in Sqoop options.     
ERROR tool.ImportTool: Imported Failed: column not found: call_date 

我在HDP 2.1 使用sqoop 1.4.4.2.1雖然Teradata的數據庫是14.10

任何指針將會很有幫助。

+0

通過查看錯誤,你有沒有正確地提供的列名? –

+0

是的,一切都是正確的。 正如我上面提到的,如果我將'lastmodified'改爲'append',一切正常。 – knowone

+0

可能與Teradata處理增量最後修改的導入中的此錯誤有關? https://issues.apache.org/jira/browse/SQOOP-2402 –

回答