I am not able to get the alias name for the first column
For example my query is :Create External Table '' USING (DELIMETER ',' INCLUDEHEADER REMOTESOURCE 'YES') as
Select 'ABC' as TABLENAME,
Count(1) AS Row_Count From ABC;
In this case my output in .csv file is :
,ROW_COUNT
ABC,20000
Here I am not getting the first alias which is 'TABLENAME'
I am not able to get alias name when my select statement contains "COALESCE" function
For example my query is :Create External Table '' USING (DELIMETER ',' INCLUDEHEADER REMOTESOURCE 'YES') as
Select 'ABC' as TABLENAME,
Coalesce(Sum(COLUMN1),0) as COLUMN1,
Sum(COLUMN2) as COLUMN2,
Coalesce(Sum(COLUMN3),0) as COLUMN3
From ABC;
In this case my output in .csv file is :
,,COLUMN2,
ABC,2123,4535,5652
Here I am not getting the column name of the first alias and the alias where I have used 'COALESCE' function