[
https://issues.apache.org/jira/browse/SPARK-20236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483621#comment-16483621
]
dori waldman edited comment on SPARK-20236 at 5/22/18 8:07 AM:
---------------------------------------------------------------
Hi
I would like to use this new functionality: overwrite specific partition
without delete all data in s3
I used the new flag (spark.sql.sources.partitionOverwriteMode="dynamic") and
test it locally from my IDEA and it worked (I was able to overwrite specific
partition in s3) but when I deployed it to hdp 2.6.5 with spark 2.3.0 same code
didn't create the s3 folders as expected , folder didn't create at all , only
temp folder has been created
My code :
df.write
.mode(SaveMode.Overwtite)
.partitionBy("day","hour")
.option("compression", "gzip")
.parquet(s3Path)
As this is a new feature maybe the issue is with HDP (hortonworks)
was (Author: doriwal):
Hi
I would like to use this new functionality: overwrite specific partition
without delete all data in s3
I used the new flag (spark.sql.sources.partitionOverwriteMode="dynamic") and
test it locally from my IDEA and it worked (I was able to overwrite specific
partition in s3) but when I deployed it to hdp 2.6.5 with spark 2.3.0 same code
didn't create the s3 folders as expected , folder didn't create at all
My code :
df.write
.mode(SaveMode.Overwtite)
.partitionBy("day","hour")
.option("compression", "gzip")
.parquet(s3Path)
As this is a new feature maybe the issue is with HDP (hortonworks)
> Overwrite a partitioned data source table should only overwrite related
> partitions
> ----------------------------------------------------------------------------------
>
> Key: SPARK-20236
> URL: https://issues.apache.org/jira/browse/SPARK-20236
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.2.0
> Reporter: Wenchen Fan
> Assignee: Wenchen Fan
> Priority: Major
> Labels: releasenotes
> Fix For: 2.3.0
>
>
> When we overwrite a partitioned data source table, currently Spark will
> truncate the entire table to write new data, or truncate a bunch of
> partitions according to the given static partitions.
> For example, {{INSERT OVERWRITE tbl ...}} will truncate the entire table,
> {{INSERT OVERWRITE tbl PARTITION (a=1, b)}} will truncate all the partitions
> that starts with {{a=1}}.
> This behavior is kind of reasonable as we can know which partitions will be
> overwritten before runtime. However, hive has a different behavior that it
> only overwrites related partitions, e.g. {{INSERT OVERWRITE tbl SELECT
> 1,2,3}} will only overwrite partition {{a=2, b=3}}, assuming {{tbl}} has only
> one data column and is partitioned by {{a}} and {{b}}.
> It seems better if we can follow hive's behavior.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]