공부
[Spark] dataframe to table
승가비
2022. 11. 7. 20:18
728x90
my_DF.createOrReplaceTempView("my_temp_table");
spark.sql("drop table if exists my_table");
spark.sql("create table my_table as select * from my_temp_table");
How to create hive table from Spark data frame, using its schema?
I want to create a hive table using my Spark dataframe's schema. How can I do that? For fixed columns, I can use: val CreateTable_query = "Create Table my table(a string, b string, c double)"
stackoverflow.com
728x90