- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to export table column heaers on HDFS
- Labels:
-
Apache Hadoop
Created ‎11-06-2017 03:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
I'm trying to export table on HDFS via Ambari but the .csv file exported has only the table content WITHOUT the column headers: if I export the same table via Ambari on my PC, the .csv file CONTAINS the column headers.
Does anybody knows how to export the column headers also when I export the table on HDFS?
Thanks for the cooperation,
Ciao,
Ennio
Created ‎11-06-2017 03:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Ennio Sisalli,
Before running your query that save the result in HDFS, can you try to set the following parameter:
set hive.cli.print.header=true;
Best regards,
Michel
Created ‎11-06-2017 04:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michel,
I've verified that in the hive configuration from the Ambari web view (in detail in the advanced configuration - advanced hive site) the hive.cli.print.header is set at true, but the problem is still the same.
I've tried also to restart the services, but we always face the issue.
Let me explain better the steps I execute to face the problem:
- Login to Ambari
- open Hive Web View 2.0
- execute a query
- select "Save to HDFS"
- set the name of the csv --> the csv has NOT the column headers.
I' ve also tried to execute the command you shared in the Hive Web View 2.0 view before the query, but the result is still the same.
Can you help me?
Thanks for your time,
Ennio.
