Sqoop数据增量导入

从mysql增量导出到hive库增量导入参数: --check-column Source column to check for incremental--incremental Define an incremental import of type--last-value Last imported value in the incremental--column
摘要由CSDN通过智能技术生成

从mysql增量导出到hive库

增量导入参数:--check-column Source column to check for incremental

--incremental Define an incremental import of type

--last-value Last imported value in the incremental

--columns 指定源表字段

--enclosed-by 行业分隔符

目前可以使用两种方式:

  1. append模式

    可以使用append 加 --where 来达到根据时间戳来增量更新。

    sqoop import  --connect jdbc:mysql://192.168.100.36:3306/test -username admin -password admin --table test_mysql_to_hive_mic --where "jap_date_time >20160101.100101 and jap_date_time <=20161127.100101" --hive-database mysql --hive-table test_mysql_to_hive --split-by des_mysql_id --hive-import --incremental append --check-column des_mysql_id --last-value 0 --enclosed-by "\t"
  2. lastmodified模式

    直接使用l

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值