下面是我创建的sqoop作业
sqoop job --create sqoop_incremental_job -- import --connect jdbc:mysql://quickstart.cloudera:3306/retail_db --username retail_dba --password cloudera --table categories --target-dir /user/cloudera/sqoop_incremental_job_categories --incremental append --check-column category_id --last-value 10 -m 1
例如:最后一个值为10
现在我通过每次在 mysql 中添加新记录来运行 sqoop 作业 2 次,以便增量将执行追加到 HDFS 中的现有数据。
问题是每次使用 sqoop job --exec sqoop_incremental_job
运行作业时,last-value 是如何更新的,我如何才能看到每次更新的值我什么时候开始工作???
最佳答案
根据 sqoop docs :
If an incremental import is run from a saved job, this value will be retained in the saved job. Subsequent runs of
sqoop job --exec someIncrementalJob
will continue to import only newer rows than those previously imported.
为了查看最后一个值,
If an incremental import is run from the command line, the value which should be specified as
--last-value
in a subsequent incremental import will be printed to the screen for your reference.
关于mysql - 我如何查看 sqoop 作业中的增量更新值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40912682/