首页 > 解决方案 > Sqoop 命令 - 选项缺少参数:merge-key

问题描述

在 cloudera 的 sqoop 命令中使用 lastmodified 和 --merget-key 选项导入表。它在执行命令时抛出缺少参数异常。这是我的命令

[cloudera@quickstart ~]$ sqoop import --connect jdbc:mysql://localhost/retail_db --table orders_temp --incremental lastmodified --check-column order_id --split-by order_id --username root --merge-key --P
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
18/11/09 22:42:15 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.13.0
Missing argument for option: merge-key
[cloudera@quickstart ~]$

标签: apache-sparkhadoopsqoopsqoop2

解决方案


您需要明确指定要用作合并键的列的名称:--merge-key <col>.


推荐阅读