SELECT查询蜂巢

问题描述 投票:2回答:1

我是Hive的新手,我想只选择以 "id "结尾的列,例如,movieid,userid等。

我试过了: SELECT '*+(id)' FROM ratings WHERE movieid = 1; 但是没有用

我怎么能做一个这样的查询?

hive hiveql
1个回答
2
投票

这里是你可以使用regex来匹配你要找的列名,下面是答案。

set hive.support.quoted.identifiers=none;
select `.*id` from ratings WHERE movieid = 1;
© www.soinside.com 2019 - 2024. All rights reserved.