[ https://issues.apache.org/jira/browse/SPARK-13699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16449684#comment-16449684 ]
Manish Kumar edited comment on SPARK-13699 at 4/24/18 11:50 AM: ---------------------------------------------------------------- I am not sure whether the issue is resolved or not. But as a workaround, I have used JDBC to drop and create a tableĀ and then saved data using append mode . was (Author: mkbond777): I am not sure whether the issue is resolved or not. But as a workaround, I have used JDBC to drop the table and then saved data using SAVE mode. > Spark SQL drops the table in "overwrite" mode while writing into table > ---------------------------------------------------------------------- > > Key: SPARK-13699 > URL: https://issues.apache.org/jira/browse/SPARK-13699 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 1.6.0 > Reporter: Dhaval Modi > Priority: Major > Attachments: stackTrace.txt > > > Hi, > While writing the dataframe to HIVE table with "SaveMode.Overwrite" option. > E.g. > tgtFinal.write.mode(SaveMode.Overwrite).saveAsTable("tgt_table") > sqlContext drop the table instead of truncating. > This is causing error while overwriting. > Adding stacktrace & commands to reproduce the issue, > Thanks & Regards, > Dhaval -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org