Hive:Unable to query output to pipe delimited file with column header


#1

I want to for all symbols having avg low price >10 to pipe delimited output file/screen output with column header like below example.
Symbol| Low Price
CA|19.32319067795453
However, I am unable to select column alias having spaces(Low Price) and print column header. I am able to print like.
symbollowprice
CA|19.32319067795453
Could you please take a look at my query and help?

hive -e “select concat_ws(’|’, Symbol,Lowprice) as output
from (select CAST(symbol1 as STRING) AS Symbol, CAST(lowprice as STRING) AS LowPrice
from (select symbol1, avg(price_low) lowprice
from nyse_hdfs group by symbol1
) A where lowprice > 10
) AS B” > output.txt