오라클이나 DBMS에서 자주 쓰던 형태로 쿼리를 hive에서 돌리면 이런 오류가 난다.


Unsupported SubQuery Expression 'keyword': Correlating expression cannot contain unqualified column references.



select

   *

from

  tb_sample

where

  keyword in (select keyword from tb_my_kwd)



그 이유는 메인테이블과 서브테이블의 keyword 명을 구분해줘야 하기 때문이다.

눈으로 보면 딱 알겠는데 hive 에서는 지정해줘야한다. ;;;;




select

   *

from

  tb_sample t

where

  t.keyword in (select keyword from tb_my_kwd)



+ Recent posts