Hue: run sqoop free query

本文介绍了解决在Hue平台运行Sqoop任务时出现的错误方法。当使用自由查询时,需要正确设置参数而不是在命令面板中填写命令。文章详细解释了如何配置查询并指定目标目录。

When run a sqoop job in hue. The is a error:



 

The sqoop job likes:



 Root Cause:

The Sqoop command can be specified either using the command element or multiple arg elements.

When using the command element, Oozie will split the command on every space into multiple arguments.

When using the arg elements, Oozie will pass each argument value as an argument to Sqoop.

The arg variant should be used when there are spaces within a single argument.

 

 NOTE: The arg elements syntax, while more verbose, allows to have spaces in a single argument, something useful when using free from queries.

 

 When importing a free-form query, you must specify a destination directory with --target-dir.

 When using --hive-import, the --target-dir will be a stage dir which will be deleted from hdfs after data loaded to hive. so I use  /user/zhaohj/hive/warehouse/inok_raw.db/xx

 

Solution: When use sqoop free query, you need use parameters not fill the commnads in 'commnd' panel.

Just like:



 

 --query

SELECT user_id, GROUP_CONCAT(target_userid SEPARATOR ',') AS fans  FROM inok_friend WHERE relation=6 AND $CONDITIONS GROUP BY user_id;

 

 

Reference

https://oozie.apache.org/docs/3.3.0/DG_SqoopActionExtension.html

 

 

 

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值