Spark Dataframe Not Appending To The Table
I am unable to append to a table when writing to a table using dataframe write Here is the command I am using df1.write.mode('append').jdbc('jdbc:jtds:sqlserver://noi-nipuna-w81/s
Solution 1:
Urug and Hafiz have already answered. Below code did the job for me.
sqlDF
.write()
.mode(SaveMode.Append)
.jdbc(jdbcDBUrl, "DBName.SchemaName.TableName", connProperties);
Solution 2:
I had the same problem with MS SQL Server. I found that updating Spark to 1.6.0 fixed the problem (link to the other SO answer). The reason was a buggy query for checking if the table exists.
Post a Comment for "Spark Dataframe Not Appending To The Table"