Re: Best Practice for Writing data into a Hive table

2019-04-13 Thread Yeikel
Writing to CSV is very slow. >From what I've seen this is the preferred way to write to hive ; myDf.createOrReplaceTempView("mytempTable") sqlContext.sql("create table mytable as select * from mytempTable"); Source : https://stackoverflow.com/questions/30664008/how-to-save-dataframe-directly

Best Practice for Writing data into a Hive table

2019-04-13 Thread Debabrata Ghosh
Hi, Please can you let me know which of the following options would be a best practice for writing data into a Hive table : Option 1: outputDataFrame.write .mode(SaveMode.Overwrite) .format("csv") .save("hdfs_path") Option 2: Get the data