Is there any way to get the column name along with the output while execute any query in Hive?

前端 未结 7 1248
醉话见心
醉话见心 2020-12-23 02:17

In Hive, when we do a query (like: select * from employee), we do not get any column names in the output (like name, age, salary that we would get in R

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-23 02:57

    1)Permenant solution
    change this property in hive-site.xml file under $HIVE_HOME/conf folder
        
        hive.cli.print.header
        true
        Whether to print the names of the columns in query output.
        
        
    2)Temporary solution:
    go to hive prompt execute this comman
       hive>set hive.cli.print.header=True
    

提交回复
热议问题