根据自增ID导入数据时重复,可以使用下列方法
7.2.10. Incremental Imports
Sqoop provides an incremental import mode which can be used to retrieve only rows newer than some previously-imported set of rows.
Sqoop提供了一种增量导入模式,该模式可用于仅检索比某些先前导入的行集新的行。
The following arguments control incremental imports:
以下参数控制增量导入:
Argument Description
--check-column (col)
Specifies the column to be examined when determining which rows to import. (the column should not be of type CHAR/NCHAR/VARCHAR/VARNCHAR/ LONGVARCHAR/LONGNVARCHAR)
指定在确定要导入的行时要检查的列。(该列的类型不得为CHAR / NCHAR / VARCHAR / VARNCHAR / LONGVARCHAR / LONGNVARCHAR)
--incremental (mode)
Specifies how Sqoop determines which rows are new. Legal values for mode include a