spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fengdong Yu <fengdo...@everstring.com>
Subject Re: SparkSQL API to insert DataFrame into a static partition?
Date Wed, 02 Dec 2015 04:02:35 GMT
Hi
you can try:

if your table under location “/test/table/“ on HDFS
and has partitions:

 “/test/table/dt=2012”
 “/test/table/dt=2013”

df.write.mode(SaveMode.Append).partitionBy("date”).save(“/test/table")



> On Dec 2, 2015, at 10:50 AM, Isabelle Phan <nliphan@gmail.com> wrote:
> 
> df.write.partitionBy("date").insertInto("my_table")


Mime
View raw message