Export the data from a hive/impala table with few conditions into file
<p>What is the efficient way to export the data from hive/impala table with conditions into file(the data would be huge, close to 10 GB)? The format of the hive table is paraquet with snappy compressed and file is csv.</p>

<p>The table is partitioned daily and data needs to be extracted on daily basis, I would like to know if </p>

<p>1) Imapala approach</p>

<p>impala-shell -k -i servername:portname -B -q 'select * from table where year_month_date=$$$$$$$$' -o filename '--output_delimiter=\001'</p>

<p>2) Hive approach</p>

<p>Insert overwrite directory '/path' select * from table where year_month_date=$$$$$$$$</p>

<p>would be efficient</p>