Hello Community,
My apologies for the confusing subject question.
I have created the following hadoop hql script and deployed the script in both hadoop on Microsoft Azure and Ambari.
DROP TABLE IF EXISTS HiveSampleIn;
CREATE EXTERNAL TABLE HiveSampleIn
(
anonid int,
eprofileclass int,
fueltypes STRING,
acorn_category int,
acorn_group STRING,
acorn_type int,
nuts4 STRING,
lacode STRING,
nuts1 STRING,
gspgroup STRING,
ldz STRING,
gas_elec STRING,
gas_tout STRING
)
partitioned by ( acorn_category int, acorn_categorycount int)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '10' STORED AS TEXTFILE LOCATION 'wasb://adfgetstarted@geogstoreacct.blob.core.windows.net/samplein/';
DROP TABLE IF EXISTS HiveSampleOut;
CREATE EXTERNAL TABLE HiveSampleOut
(
acorn_category int,
acorn_categorycount int )
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '10' STORED AS TEXTFILE LOCATION 'wasb://adfgetstarted@geogstoreacct.blob.core.windows.net/sampleout/';
INSERT OVERWRITE TABLE HiveSampleOut
Select
acorn_category,
count(*) as acorn_categorycount
FROM HiveSampleIn Group by acorn_category
The results in Ambari provides a .csv file looks as follows:
(notice the column headings in RED)

However, in Azure the results are provided as a textfile (which is fine) but it doesn't have the column headings as shown
Can someone please let me know how to include the column headings in the textfile?
