sqoop1 按mysql时间字段 增量同步

来源:互联网 发布:ubuntu 16.04 ssd hdd 编辑:程序博客网 时间:2024/06/05 16:49
/data1/xinsrv/sqoop/bin/sqoop import  \        --connect "jdbc:mysql://%s:3306/%s?characterEncoding=UTF-8&tinyInt1isBit=false"  \        --username %s --password '%s' --hive-database %s --hive-table %s \        --table %s  \        --check-column %s --incremental lastmodified --last-value '%s'\        --lines-terminated-by '\n' --fields-terminated-by '\0001' --hive-drop-import-delims --hive-import  \        --null-string '\\N' --null-non-string '\\N'

注:

  1. Append mode for hive imports is not yet supported
  2. –last-value ‘2017-08-25’ 相当于 where 条件 WHERE ( date >= ‘2017-08-25’ AND date < ‘2017-08-25 23:59:45.0’ )

more:
http://blog.csdn.net/linlinv3/article/details/48028521
http://blog.csdn.net/u011462328/article/details/50378181
http://www.cnblogs.com/ljy2013/p/4872126.html