hive本身不支持不等连结,可以使用如下方法实现不等连结
表a(id,data1)大表
表b (id,data1)小表
需求是表A减去表B
select c.id , c.data1 from
(select a.id as id , a.data1 as data1, b.data1 as b_data1 from a
LEFT OUTER JOIN b
ON a.id = b.id ) c
where c.b_data1 is NULL;
该方法的关键词:左连结
hive本身不支持不等连结,可以使用如下方法实现不等连结
表a(id,data1)大表
表b (id,data1)小表
需求是表A减去表B
select c.id , c.data1 from
(select a.id as id , a.data1 as data1, b.data1 as b_data1 from a
LEFT OUTER JOIN b
ON a.id = b.id ) c
where c.b_data1 is NULL;
该方法的关键词:左连结