03-09-2018 01:50 AM
Trying to read a hive table and write as text delimited file selecting few columns. Is it possible to write the text file into a server from Spark-shell as could see possible only in Hadoop files. Please help out the syntax for this if it is possible.
03-12-2018 04:17 AM
Write into HDFS files is done using rdd.saveAsTextFile commands. But right from table read , is it possible to write into some server directly as text file and not into HDFS path.
03-12-2018 09:16 AM
You can use beeline:
beeline -n username -p password -u jdbc:hive2://hiveserver:10000 -e "select a,b,c from table1" --outputformat=csv2 --silent=true > output_file.csv
You can add "--showHeader=true" if you want headers to be included.