I am executing the following
hive -e 'select product_id from table;' > out.txt
This is giving me a text file with each product id on each line. I want them to be on one line with commas in between each id. I even tried to use shell scripting to get the desired format.
paste -s -d ',' < out.txt
Using this command I am getting the result on the terminal in the right format. But the file is not getting modified. Ideally, shouldn't this be possible by setting some hive configuration.
I looked at this SO question. But it did not work for me.