[英]two queries with parameters in hive
I'm trying to run two queries in hue/hive with parameters (dates and suffixes), but it doesn't work. 我正在尝试使用参数(日期和后缀)在hue / hive中运行两个查询,但它不起作用。 I wonder if it is possible or should I always run them separately (which is inconvenient).
我想知道是否可能或者我应该总是单独运行它们(这是不方便的)。
Queries: 查询:
create table private_kubicki.tmp${suffix} as
select
id,
c1,
c2
from
private_kubicki.testy_${suffix2}
where
${cond}
;
create table private_kubicki.tmp2${suffix} as
select
id,
c1,
c2
from
private_kubicki.testy_${suffix2}
where
${cond2}
The strange thing is that sometimes I get this error: 奇怪的是,有时我会收到此错误:
Your query has the following error(s):
您的查询有以下错误:
Error while compiling statement: FAILED: ParseException line 1:33 cannot recognize input near '$' '{' 'suffix' in create table statement
编译语句时出错:FAILED:ParseException行1:33无法识别create table语句中'$''{''suffix'附近的输入
And sometimes it works but only the first table is created.. 有时它可以工作,但只创建了第一个表..
Important thing is that everything works when I ask only one query at a time. 重要的是,当我一次只询问一个查询时,一切正常。
I'm using hue: 3.5.0, (apache) hive: 0.13.1 我正在使用hue:3.5.0,(apache)hive:0.13.1
在https://issues.cloudera.org/browse/HUE-2136完成之前,这不能正常工作,但在故障单中解释了2个解决方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.