hive中select排除某些列名

排除num列

set hive.support.quoted.identifiers=none;
select
`(num)?+.+`
from
    (select 
    row_number() over (partition by uid order by pay_time asc) as num
    ,*
    from order) first_order
where num = 1;

排除num和uid列

set hive.support.quoted.identifiers=none;
select
`(num|uid)?+.+`
from
    (select 
    row_number() over (partition by uid order by pay_time asc) as num
    ,*
    from order) first_order
where num = 1;

 

上面的 set hive.support.quoted.identifiers=none; 可以替换为:

'hive-site.xml'中添加以下配置,

hive.support.quoted.identifiers=none

你可能感兴趣的:(hive)