Sqoop hive 导入错误数据

发布于 2025-01-13 20:04:22 字数 539 浏览 2 评论 0原文

我正在尝试从 PGSQL 导入数据并使用 sqoop 加载到 Hive 中 使用的查询:

sqoop import --connect jdbc:postgresql://${HOST}:${PORT}/${INST} --username=${USER} --password=$PASS} --delete-target-dir --target-dir /TC/Customer --query "Select event_id, customer_id,subscriber_id, PROCESSING_STATUS from Customer WHERE \$CONDITIONS and PROCESSING_STATUS='RD'" --where " 1=1 "  -m 1 --fields-terminated-by "," --hive-import --create-hive-table --hive-table Customer 

sqoop 命令成功后计数将匹配,但目标中的记录很少,而源中根本不存在。 我尝试在 pkey 上进行 split-by 但出现同样的错误

I am trying to import data from PGSQL and load into Hive using sqoop
Query used:

sqoop import --connect jdbc:postgresql://${HOST}:${PORT}/${INST} --username=${USER} --password=$PASS} --delete-target-dir --target-dir /TC/Customer --query "Select event_id, customer_id,subscriber_id, PROCESSING_STATUS from Customer WHERE \$CONDITIONS and PROCESSING_STATUS='RD'" --where " 1=1 "  -m 1 --fields-terminated-by "," --hive-import --create-hive-table --hive-table Customer 

The counts will match after sqoop command is successful, but there are few records in destination which is not at all present in source.
i tried split-by on pkey but same error

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文