Basically when we run the query in any RDBMS database , we get the column names along with rows, but that is not in the case for HIVE CLI.
To achive that, we need set the hive.cli.print.header property to true.
This can be done two ways:
1)Temporary solution:
On the hive CLI prompt executing this command
hive>set hive.cli.print.header=True
2)Permenant solution
Adding this property in hive-site.xml file under $HIVE_HOME/conf folder
<property>
<name>hive.cli.print.header</name>
<value>true</value>
<description>Whether to print the names of the columns in query output</description>
</property>
To achive that, we need set the hive.cli.print.header property to true.
This can be done two ways:
1)Temporary solution:
On the hive CLI prompt executing this command
hive>set hive.cli.print.header=True
2)Permenant solution
Adding this property in hive-site.xml file under $HIVE_HOME/conf folder
<property>
<name>hive.cli.print.header</name>
<value>true</value>
<description>Whether to print the names of the columns in query output</description>
</property>
No comments:
Post a Comment