Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Problem in Hive Right Outer Join


Copy link to this message
-
Problem in Hive Right Outer Join
Jérôme Verdier 2013-08-08, 09:07
Hi,

I encountered a problem with Right Outer Join in Hive.

Here is where is the problem :

        FROM default.ca ca
          JOIN default.kpi_magasin mtransf
          ON  mtransf.co_societe = (CASE WHEN ca.co_societe = 1 THEN 1 ELSE
2 END)
          AND mtransf.id_magasin = ca.id_magasin
          RIGHT OUTER JOIN default.ssect_comptable a ON a.id_ssect_cpt ca.id_ssect_cpt
          JOIN default.ssect_comptable b ON a.co_ssect_cpt = b.co_ssect_cpt
AND b.co_societe = 6
          JOIN default.kpi_ssect_cpt s
          ON  s.co_societe   = (CASE WHEN ca.co_societe = 1 THEN 1 ELSE 2
END)
          AND (CASE
                WHEN ca.co_societe = 6 THEN
                  b.id_ssect_cpt
                  ELSE s.id_ssect_cpt
              END = ca.id_ssect_cpt)
          AND s.niveau       = 3

here is the error code :

FAILED: SemanticException [Error 10017]: Line 94:16 Both left and right
aliases encountered in JOIN 'id_ssect_cpt'

I have try multiples option to resolve this error, but problem is still
here.

what is wrong  here?

Thanks,

--
Jérôme