Question: how to export data from hive table to text file?
Answer: Method 1 : hive -e 'select * from table_orc_data;' | sed 's/[[:space:]]\+/,/g' > ~/output.csv. Method 2: $ hadoop fs -cat hdfs://servername/user/hive/warehouse/databasename/table_csv_export_data/* > ~/output.csvCopy. — Step 3a: Create CSV table with dummy header column as first row.