Hive: writing column headers to local file?

前端 未结 7 1434
别跟我提以往
别跟我提以往 2020-12-08 01:17

Hive documentation lacking again:

I\'d like to write the results of a query to a local file as well as the names of the columns.

Does Hive support this?

7条回答
  •  失恋的感觉
    2020-12-08 01:44

    Yes you can. Put the set hive.cli.print.header=true; in a .hiverc file in your main directory or any of the other hive user properties files.

    Vague Warning: be careful, since this has crashed queries of mine in the past (but I can't remember the reason).

提交回复
热议问题