欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

要求在 Hadoop 配置单元中使用 CASE WHEN - LIKE - REGEXPEN

最编程 2024-04-01 19:47:57
...
select distinct ending from (select date, ending, name, count(distinct id) from (select CONCAT_WS("/",year,month,day,hour) as date, id, name, case when type = 'TRAN' then 'tran' when events regexp '%[:]no_reply[:]%[^o][^n][:]incomplete[:]%' and type rlike '%HUP' then 'con' when events not regexp '%[:]no_reply[:]%[^o][^n][:]incomplete[:]%' and type rlike '%HUP' then 'aban' else 'other' end as ending from data_struct1) tmp group by date, ending, name) tmp2;