-
Notifications
You must be signed in to change notification settings - Fork 347
Closed
Description
When using SaveMode.Overwrite (which I honestly haven't checked to see if its supported) like the following code:
.toDF().write
.format("com.databricks.spark.redshift")
.option("jdbcdriver", "com.amazon.redshift.jdbc41.Driver")
.option("url", redshiftJdbcUrl)
.option("dbtable", "pf.some_table_here")
.option("tempdir", tempDirBucket)
.mode(SaveMode.Overwrite)
.save()
I encounter:
Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: syntax error at or near ".";
... 80 more
(Lost the rest of the stack trace in a closed screen session but I believe the error can be reproduced by specifying the schema name with the table name and using SaveMode.Overwrite.)
Using SaveMode.Append is a work around (I just truncate the table prior to saving).