Hive Table Join

Hive Table Join

Hive table join is little bit different from MySQL.

If you write same code, it does not work

This is an example.

Join table from different schema

select a.column1, b.column2 from tablea a inner join dbb.tableb b ON a.column2 = b.column3 WHERE b.column4 = 'xxxxx';

The key point is use alias after table name. In this case, tablea as “a”, dbb.tableb as “b”. You cannot use “as” clause for Hive. (MySQL use “as”, alias name)

Data
スポンサーリンク
Professional Programmer2

コメント