Q:

selecting column output into a string. Hive

I am looking for a way to customize my output in hive. 
For example my query is.
select col1,col2 from table1

I want col1 and col2 to be inserted in a predefined string like.
"Hey there, value1 is <col1> and value2 is <col2>"
And if possible all of this goes into an output file on local filesystem. Please suggest a way for doing this.

A:

Try this:    
hive -e 'select concat('Hey there value1 is ', col1, ' and value2 is ', col2, '.') as my_string from my_table' > /path/localfilesystem/filename.txt

