【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 小时前
组合查询(union)
数据库·sql
二十六画生的博客5 小时前
每个subtask都提交一份快照到hdfs,会把10个小的快照合并成一个大的吗?谁来合并?
大数据·hadoop·hdfs·flink
juniperhan5 小时前
Flink 系列第24篇:Flink SQL 集成维度表指南:存储选型、参数调优与实战避坑
大数据·数据仓库·sql·flink
Chengbei116 小时前
AI大模型网关存在SQL注入、影响版本LiteLLM 1.81.16~1.83.7(CVE-2026-42208)
数据库·人工智能·sql·安全·web安全·网络安全·系统安全
隐于花海,等待花开6 小时前
41.ABS / POW / SQRT 函数深度解析
大数据·hive
冷小鱼7 小时前
从关系模型(SQL)基石到AI与信创时代的智能查询语言
数据库·sql
庞轩px7 小时前
致远互联实习复盘:一条SQL替代300次循环查询,组织架构选择器从5秒降到300毫秒
java·sql·mysql·mybatis·实习经历·n+1问题·join联表查询
千月落7 小时前
HDFS数据迁移
大数据·hadoop·hdfs
编程之升级打怪8 小时前
MySQL数据库SQL语句简单用法
sql·mysql
曹牧1 天前
SQL:多个事务同时修改同一索引块
数据库·sql