【Hive-SQL】Hive Select 选择语句排除一列或多列

  • 查看除了sample_date以外的所有字段信息
sql 复制代码
set hive.support.quoted.identifiers=none; 

select `(sample_date)?+.+` 
from `test`.`table` where sample_date='20230713';
  • 查看除了sample_date 和 msgtype以外的所有字段信息
sql 复制代码
set hive.support.quoted.identifiers=none; 

select `(sample_date|msgtype)?+.+` 
from `test`.`table` where sample_date='20230713';

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

'hive-site.xml' 中添加以下配置:
hive.support.quoted.identifiers=none

相关推荐
齐 飞4 小时前
使用阿里云的MaxCompute查询sql时报错:DruidPooledPreparedStatement: getMaxFieldSize error
sql·阿里云·odps
Lonely丶墨轩4 小时前
从登录入口窥见架构:一个企业级双Token认证系统的深度拆解
java·数据库·sql
周末吃鱼7 小时前
MySQL CTE:SQL查询新模式
数据库·sql·mysql
木风小助理7 小时前
解读 SQL 累加计算:从传统方法到窗口函数
大数据·数据库·sql
Justice Young9 小时前
Hive第四章:HIVE Operators and Functions
大数据·数据仓库·hive·hadoop
LF3_9 小时前
hive,Relative path in absolute URI: ${system:user.name%7D 解决
数据仓库·hive·hadoop
德彪稳坐倒骑驴11 小时前
Hive SQL常遗忘的命令
hive·hadoop·sql
山峰哥11 小时前
3000字深度解析:SQL调优如何让数据库查询效率提升10倍
java·服务器·数据库·sql·性能优化·编辑器
b***594311 小时前
mysql 迁移达梦数据库出现的 sql 语法问题 以及迁移方案
数据库·sql·mysql
Justice Young12 小时前
Hive第六章:Hive Optimization and Miscellaneous
数据仓库·hive·hadoop