2015-09-06 83 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

回答