spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Debabrata Ghosh <mailford...@gmail.com>
Subject Best Practice for Writing data into a Hive table
Date Sat, 13 Apr 2019 16:59:48 GMT
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 from a dataframe and insert the data into the Hive
table leveraging spark sql.

Thanks for your help in advance !

Cheers,
Debu

Mime
View raw message