gpt4 book ai didi

SQOOP增量导入: how it handles the data when a row is deleted from the database?

转载 作者:行者123 更新时间:2023-12-02 08:16:38 25 4
gpt4 key购买 nike

假设我有一个包含列(emp_id、emp_name、emp_age、emp_update_ts)的员工表,如果表有更新,updat_ts 字段会自动更新为当前时间戳。现在我的问题是:

当我更新/插入表中的行并使用 lastmodified 运行增量 sqoop 导入时,它将使我的数据库和 hdfs 同步,但是“如果从表中删除数据然后我使用 lastmodified 运行 sqoop 增量怎么办选项?它还会负责从 HDFS 中删除数据以保持它们同步吗?还是有任何其他方法可以处理删除情况?

最佳答案

SQOOP 只是一个导入/导出工具。它不检查任何已删除的数据。导入/导出过程完成后,您必须通过编写查询手动比较两个数据库。

或者如果您的数据集很小,那么您可以通过 impala 导入 csv 并检查。

关于SQOOP增量导入: how it handles the data when a row is deleted from the database?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41380740/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com