2015-09-06 81 views
0

我想用自由格式查詢來做sqoop作業增量導入。以下是正在使用的查詢使用自由格式查詢的Sqoop作業增量導入

sqoop job --create importjobinl -- import --connect jdbc:mysql://localhost/test --username training --password training --query 'select id,name,unix_timestamp(time_updated) from intest where $CONDITIONS' --target-dir /user/new/lll/`date +%d%T|sed 's/://g'` -m 1 --check-column time_updated --incremental append --last-value '1441526438' 

作業未創建它顯示。

Incremental imports require a table. 
Try --help for usage instructions. 

它的工作原理,當我用--table INTEST代替--query,但我想用--query轉換日期使用UNIX_TIMESTAMP因爲MySQL表INTEST價值epochtime是YYYY-MM-DD格式

使用版本:1.2.0 Sqoop,cdh3u0

回答