sqoop使用--query 实现查询语句查询 报Must specify destination with --target-dir.

使用Sqoop 报必须使用  --target-dir  

当遇到这个问题时

20/09/13 16:36:11 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
Must specify destination with --target-dir. 
Try --help for usage instructions.

sqoop 导入 Hive 分三步:
1. 先导入--target-dir 指定的 HDFS 的目录中
2. 在 Hive 中建表
3. 调用 Hive 的 LOAD DATA INPATH--target-dir中的数据移动到 Hive 中

所以需要向指定计算结果导出的目录哦 !

猜你喜欢

转载自blog.csdn.net/weixin_45592182/article/details/108564278