我试图在一堆配置单元表上运行descripe,并希望创建一堆cte,然后合并它们。像这样:
With t1 as (describe sch1.tab1)
, t2 as (describe sch1.tab2)
, t3 as (describe sch1.tab3)
select *
from t1 UNION
select *
from t2 UNION
select *
from t3
不幸的是,当我尝试这样做时,我得到了这个错误:
Error while compiling statement: FAILED: ParseException line 1:15 Failed to recognize predicate 'describe'. Failed rule: 'identifier' in table name
有什么建议吗?
1条答案
按热度按时间wooyq4lh1#
您可以在.hql中添加所有descripe命令并使用
sort -u
执行命令UNION
.