今天爱分享给大家带来ERROR tool.BaseSqoopTool: Error parsing arguments for export【解决办法】,希望能够帮助到大家。
问题描述部分
ERROR tool.BaseSqoopTool: Error parsing arguments for export:
意思是 sqoop工具不能解析这个语句。
错误原因:
里面的字段可能写错,导致不能sqoop不能识别。
解决方法
1567
仔细检查自己写的语句 ,空格,单词是否少写或多写,下面给导入语句案例介绍。
提示:注意自己对应的字段和数据库连接名字
bin/sqoop export \ --connect jdbc:mysql://bigdata03:3306/company \ --username root \ --password 123456 \ --table users_sum_money \ --num-mappers 1 \ --export-dir /user/hive/warehouse/users_sum_money \ --input-fields-terminated-by "\t"
解析: bin/sqoop sqoop命令语句 bigdata03是自己的主机名 3306是端口号 commany是mysql数据库 username password 用户和密码 users_sum_money mysql表名 num-mappers 1 输入的mappers数量 记得一定要加mappers /user/hive/warehouse/users_sum_money 导出的文件 "\t" 以\t 分割导入 这里一定要和你hive /hdfs上 导入 或者创建的表格式要一致。
问题描述全部
Warning: /opt/module/sqoop-1.4.7/bin/../../hbase does not exist! HBase imports will fail. Please set $HBASE_HOME to the root of your HBase installation. Warning: /opt/module/sqoop-1.4.7/bin/../../hcatalog does not exist! HCatalog jobs will fail. Please set $HCAT_HOME to the root of your HCatalog installation. Warning: /opt/module/sqoop-1.4.7/bin/../../ac喂饭ulo does not exist! Ac喂饭ulo imports will fail. Please set $ACCUMULO_HOME to the root of your Ac喂饭ulo installation. 20/11/24 15:56:14 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Error parsing arguments for export: 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: --connect 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: jdbc:mysql://bigdata03:3306/mpany 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: --username 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: root 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: --password 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: 123456 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: --table 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: users_sum_money 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: --num-mappers 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: 1 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: --export-dir 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: /user/hive/warehouse/users_s_money 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: --input-fields-terminated-b 20/11/24 15:56:14 ERROR tool.BaseSqoopTool: Unrecognized argument: \t Try --help for usage instructions.