【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

相关推荐
百***81271 天前
从 SQL 语句到数据库操作
数据库·sql·oracle
q***d1731 天前
SQL性能调优
数据库·sql
Macbethad1 天前
使用WPF编写一个多维度伺服系统的程序
大数据·hadoop·wpf
百***35941 天前
从0到1部署Tomcat和添加servlet(IDEA2024最新版详细教程)
hive·servlet·tomcat
howard20051 天前
5.2 Hive插入数据实战
hive·插入数据
e***U8201 天前
SQL在数据迁移中的脚本编写
数据库·sql
沛沛老爹1 天前
基于LangChain SQL Agent与自研LLM+Prompt方案的技术原理、实现路径与落地实践
sql·ai·langchain·prompt·agent·text2sql
Elias不吃糖1 天前
SQL 注入与 Redis 缓存问题总结
c++·redis·sql
杂家1 天前
Hive on Spark && Spark on Hive配置
大数据·数据仓库·hive·hadoop·spark
p***43482 天前
SQL在业务智能中的分析函数
数据库·sql