问题
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>
<value>false</value>
</property>
来源:https://stackoverflow.com/questions/31705985/is-it-possible-to-stop-hive-from-printing-the-database-when-printing-column-head