Re: SQL to export query result in a CSV file ?

2015-02-25 Thread Dhaval Rami
Thanks Pariksheet. On Wed, Feb 25, 2015 at 1:35 PM, Pariksheet Barapatre pbarapa...@gmail.com wrote: Hi Dhaval, You can use below code - $SQLLINE $ZKEEPER END !outputformat csv !record $TMP_FILE select * from system.catalog limit 10; !record !quit END ## $SQLINE is sqlline.py path ,

SQL to export query result in a CSV file ?

2015-02-24 Thread Dhaval Rami
Is there any SQL statement which can enable me to save query results as CSV file on a local file system / hdfs ? Thanks, Dhaval

Re: SQL to export query result in a CSV file ?

2015-02-24 Thread Dhaval Rami
Thanks Vamsi. On Tue, Feb 24, 2015 at 5:02 PM, Vamsi Krishna vamsi.attl...@gmail.com wrote: Using 'record' 'outputformat' commands of sqlline.py you can save data to csv file. After connecting to cluster using sqlline.py execute the following commands: 1. !outputformat csv 2. !record