sqoop import --connect jdbc:mysql://192.168.160.130:3306/mydb --username root --password jqe6b6 --table news --hive-import --hive-table mydb.news --incremental append --check-column --last-value 0 --split-by id --target-dir /hdfs://zhaosai:9000/user/hive/warehouse/ne 23/06/07 17:15:24 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7 Missing argument for option: check-column
时间: 2023-08-16 18:04:39 浏览: 84
根据错误提示,缺少 `--check-column` 参数的值。请在 `--check-column` 参数后面指定一个有效的列名,例如:
```
sqoop import --connect jdbc:mysql://192.168.160.130:3306/mydb --username root --password jqe6b6 --table news --hive-import --hive-table mydb.news --incremental append --check-column id --last-value 0 --split-by id --target-dir /hdfs://zhaosai:9000/user/hive/warehouse/ne
```
在上面的命令中,我将 `--check-column` 参数的值设置为 `id`,因为您在 `--split-by` 参数中使用了 `id` 作为分片列。
请注意,如果您使用的是自定义查询而不是简单的表导入,则需要使用 `--query` 参数来指定查询语句,并在查询语句中包含 `--check-column` 和 `--split-by` 参数的值。
相关问题
sqoop import --connect jdbc:mysql://192.168.160.130:3306/mydb --username root --password jqe6b6 --table news --hive-import --hive-table mydb.news --incremental append --check-column --last-value 0 --split-by news --target-dir /hdfs://zhaosai:9000/user/hive/warehouse/news
根据您提供的 Sqoop 命令,您需要指定一个有效的 `--check-column` 参数,以便 Sqoop 使用该列来确定哪些行是新的或更新的。在您的命令中,`--check-column` 参数后面缺少列名,因此导致了错误。
请在 `--check-column` 参数后面指定一个有效的列名,例如:
```
sqoop import --connect jdbc:mysql://192.168.160.130:3306/mydb --username root --password jqe6b6 --table news --hive-import --hive-table mydb.news --incremental append --check-column id --last-value 0 --split-by news --target-dir /hdfs://zhaosai:9000/user/hive/warehouse/news
```
在上面的命令中,我将 `--check-column` 参数的值设置为 `id`,因为在您的表结构中没有一个适合作为检查列的整数类型列或时间戳列。
请注意,如果您使用的是自定义查询而不是简单的表导入,则需要使用 `--query` 参数来指定查询语句,并在查询语句中包含 `--check-column` 和 `--split-by` 参数的值。
bin/sqoop list-databases --connect jdbc:mysql://192.168.10.102:3306/ --username root --password 123456
This command lists all databases in the MySQL server running at IP address 192.168.10.102 on port 3306, using the root user with password 123456 to authenticate. The output will show the names of all databases available in the server.