Is it possible to stop HIVE from printing the database when printing column headers using hive -e 'select'?
问题 When performing: hive -e 'select * from database.table' > /localfilesystem/mytable.txt the column header names are in the form database.columnname and I would like them to be columnname only. Is there a way to supress the database in the columnname when performing the above type of query? 回答1: hive.resultset.use.unique.column.names was added in 0.13 and defaults to True . Just set it to false in your ~/.hiverc or in hive-site.xml <property> <name>hive.resultset.use.unique.column.names</name>