一:HIve中查询数据表中的信息默认是不显示表头的
可以通过修改hive安装文件中的配置文件
[hadoop@hadoop03 conf]$ vi hive-site.xml
<property>
<name>hive.cli.print.header</name>
<value>true</value>
<description>Whether to print the names of the columns in query output</description>
</property>
<property>
<name>hive.cli.print.current.db</name>
<value>true</value>
<description>Whether to include the current database in the Hive prompt</description>
</property>
修改之后重新进入hive中,查询就可以显示表头了
二:切换本地模式
set hive.exec.mode.local.auto=true;