vendredi 31 juillet 2015

Comparing rows of two tables in HIVE

I want to compare two tables in HIVE. More specifically, I want to see if table2 has any rows that are not in table1, and vice versa. So far I have this:

select count(A.PERS_KEY) from
table1 A left outer join table2 B
on A.PERS_GEN_KEY = B.PERS_KEY
where B.PERS_KEY IS NULL;

But this will only check for the PERS_KEY. How would I check to see if an entire row is in one table but not the other?

Aucun commentaire:

Enregistrer un commentaire