sqoop 1 mysql時間フィールド増分同期

2632 ワード

/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 '
'
--fields-terminated-by '\0001' --hive-drop-import-delims --hive-import \ --null-string '\\N' --null-non-string '\\N'

注意:
  • Append mode for hive imports is not yet supported
  • –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