I am trying to do count comparision between two table . As minus operator does not work in hive , it is not happening. Could you please give some simple way to do count comparision between two tables.
select 'Call Detail - Hive T1 to HDFS Staging - Data Compare',
case when cnt>0 then 'Fail' Else 'Pass' end
from
(select count(*) cnt from (
(select
count(*) from students1 s1)-
(select count(*) from students2 s2)
) as tbl1
) as tbl2;
It's throwing error:
FAILED: ParseException line 81:0 cannot recognize input near '(' '(' 'select' in from source