Creation of DataFrame and tables in Hive

hive
apache-spark

#1

Initially, I have created a hive table and retrieved the table data from spark using the data frame. I have created new DF from existing DF.
Now, the question is how to create the new hive table by making use of the new DF & see the new table in Hive?

TIA


#2

Use the saveAstable
Example :-
New_DF.write.mode(“overwrite”).saveAsTable(“DatabaseName.NewHivetablename”);


#3

Thanks for the help sir