apache-spark - 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 ~]$
解决方案
您需要明确指定要用作合并键的列的名称:--merge-key <col>
.
推荐阅读
- java - 如何从数据库中获取用户以使用 Spring Boot 和 Spring Data Jpa 登录
- apache-spark - Databricks 增量表截断包含“-”的列数据
- sql - 如何在 PostgreSQL 中查找两个日期之间的间隔
- express - 我们如何对 put 请求密码进行哈希处理?
- c# - 如何订购角色层次结构以访问 MVC5 中的授权页面?
- mysql - 如何使此 sql 查询与 mysql 的旧版本(如 v.5.5 及更高版本)兼容?
- java - 如何使用 JPA Criteria Builder 按长度(列名)排序
- javascript - angular 8 routerLink 在 ios 设备浏览器中无法正常工作
- google-apps-script - Google-sheet:从导入的范围中选择相关单元格
- mysql - 错误 ERROR 2013 (HY000):在 Lightsail 上设置组复制的查询期间丢失与 MySQL 服务器的连接