在下面转换而不是从edw到hive

fquxozlt  于 2021-06-26  发布在  Hive
关注(0)|答案(2)|浏览(285)
select source_type, data_load_type from wc_table_inf 
where not (source_type IN ('EHUB','FOCUS','SAPReport') 
and data_load_type in ('FULL','INCR'));

这是edw查询。我需要Hive中的等效查询。我怎么能解决这个不??

dw1jzc5e

dw1jzc5e1#

试试这个。 select source_type, data_load_type from wc_table_inf where source_type not in ('EHUB','FOCUS','SAPReport') and data_load_type not in ('FULL','INCR');

iyfamqjs

iyfamqjs2#

你必须展开布尔逻辑 NOT (A and B) = NOT A OR NOT B ```
SELECT source_type
,data_load_type
FROM wc_table_inf
WHERE source_type NOT IN (
'EHUB'
,'FOCUS'
,'SAPReport'
)
OR data_load_type IN (
'FULL'
,'INCR'
);

相关问题