【问题标题】:Using Append and last modified in sqoop import statement在 sqoop 导入语句中使用 Append 和 last modified
【发布时间】:2017-09-23 07:31:04
【问题描述】:

我们使用sqoop 将Oracle 数据库中的数据提取到HDFS。人们过去经常向 SQL 表更新和添加新行。我知道 sqoop 增量导入 --append 和 --last modified 选项。

我的问题是我们是否可以在同一个导入语句中使用这两个选项?

例如,

sqoop --incremental import --lastmodified --append --check-column 'lastmodified' --check-column 'id' --lastvalue '2017-09-22-123456' --lastvalue 100

或者我们需要单独使用?还是有其他更好的方法?

【问题讨论】:

    标签: hdfs bigdata sqoop


    【解决方案1】:

    我自己找到了答案。

    lastmodified 可以根据最后修改的列处理更新和新添加的行。在这种情况下不需要使用Append。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-03
      • 1970-01-01
      • 2016-12-08
      • 2020-11-06
      • 2013-10-06
      • 2011-08-25
      • 2020-08-04
      相关资源
      最近更新 更多