我如何查看 sqoop 作业中的增量更新值?
How can i see the incremental updated value in sqoop job?
下面是我创建的 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
现在我运行 sqoop job 2次,每次都在mysql中添加新记录,这样增量就会执行追加到HDFS中的现有数据。
问题是 last-value 每次使用 sqoop job --exec sqoop_incremental_job
进行 运行 作业时如何更新以及如何查看更新后的值每次我 运行 工作时???
根据 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.
或者,如果日志丢失。使用以下命令
sqoop job --show <jobname>
- 它将列出作业的所有属性
参考
incremental.last.value - This will contain the latest value of incremental job performed.
每次我们通过 sqoop job --exec <jobname>
运行 作业时都会更新
下面是我创建的 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
现在我运行 sqoop job 2次,每次都在mysql中添加新记录,这样增量就会执行追加到HDFS中的现有数据。
问题是 last-value 每次使用 sqoop job --exec sqoop_incremental_job
进行 运行 作业时如何更新以及如何查看更新后的值每次我 运行 工作时???
根据 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.
或者,如果日志丢失。使用以下命令
sqoop job --show <jobname>
- 它将列出作业的所有属性
参考
incremental.last.value - This will contain the latest value of incremental job performed.
每次我们通过 sqoop job --exec <jobname>