Hive: How to display column names in SELECT statement output

If you’re executing any SELECT statement on Hive cli, only the rows are displayed. The column names are not displayed by default. To show the column headers, print.header property needs to be set to true. This can be done with the following statement.

By default, the output of SELECT statement will not have any column headers.

Now, let’s set the print.header to true and then try running the SELECT statement again. Notice the column headers (first_name and last_name).

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top