Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

spark write partitionby

import spark.implicits._
df.repartition($"entity", $"year", $"month", $"day", $"status").write.partitionBy("entity", "year", "month", "day", "status").mode(SaveMode.Append).parquet(s"$location")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spark #write #partitionby
ADD COMMENT
Topic
Name
1+5 =