Column headers in Hive
Do you ever want to remove the table names that show up in output columns of Hive result sets? Here’s how.
By default, hive uses table_name.column_name as the header for result sets:
All kinds of behavior in Hive is controlled by Configuration Properties (https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties). You can see all of the currently set properties by executing this:
set;
To see the current value of a specific Configuration Property, execute “set <property>”:
set hive.resultset.use.unique.column.names;
Finally, to turn off this particular property, which tells hive to use only the column name in the header, execute:
set hive.resultset.use.unique.column.names=false;
Note that in Aginity Pro, if you do not have the “Keep connection” checkbox checked, then you must run both of these statements together. Without the checkbox checked, if you run the statements individually, then the Configuration Property will be reset to the default for the second statement.
Please sign in to leave a comment.
Comments
0 comments