蜂巢侧视图爆炸,有2个桌子连接

Don*_*Don 3 hive lateral-join

检查Hive中是否可以执行此操作:

Select a.col1,b.col1
from tableA a join tableB b on a.col1 = b.col1
lateral view explode(numcred) tableA  as creds
where creds.id = 9;
Run Code Online (Sandbox Code Playgroud)

我在文档中找不到答案.简而言之:

我想加入两张桌子和LATERAL VIEW EXPLODE TABLEA

看起来很简单,但会引发语法问题.

Dav*_*itz 7

select  a.col1
       ,b.col1

from   (Select  a.col1

        from    tableA a 
                lateral view explode(numcred) e as creds 

        where   e.creds.id = 9
        ) a

        join    tableB b 

        on      a.col1 = b.col1 
Run Code Online (Sandbox Code Playgroud)