Skip to content

Commit

Permalink
fix hive warehouse path
Browse files Browse the repository at this point in the history
  • Loading branch information
glorysdj committed Nov 22, 2021
1 parent 6f8f5cd commit 958e50d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ object SparkHiveExample {
spark.sqlContext.setConf("hive.exec.dynamic.partition", "true")
spark.sqlContext.setConf("hive.exec.dynamic.partition.mode", "nonstrict")
// Create a Hive partitioned table using DataFrame API
df.write.partitionBy("key").format("hive").saveAsTable("hive_part_tbl")
df.write.partitionBy("key").format("hive")
.mode(SaveMode.Overwrite).saveAsTable("hive_part_tbl")
// Partitioned column `key` will be moved to the end of the schema.
sql("SELECT * FROM hive_part_tbl").show()
// +-------+---+
Expand Down

0 comments on commit 958e50d

Please sign in to comment.