AWS Databricks: Table dropped when trying to overwrite with truncate flag set into Exasol

43 views Asked by At

I am trying to write dataframe data into a table in Exasol from AWS Databricks using pyspark while truncating the data before the overwrite. I am using the follow command:

`_df.write.format("jdbc")
    .option("url", "**********")
    .option("dbtable", dbtable)
    .option("user", username)
    .option("password", password)
    .option("truncate", "true")
    .option("driver", "com.exasol.jdbc.EXADriver")
    .mode("overwrite")  # You can use "overwrite", "append", "ignore", or "error"
    .save()`

This results in the table on Exasol to be dropped. If there is a solution that could send a truncate command using this jdbc connection prior to write (in append mode) that could also work.

The cluster and Exasol driver details are:

0

There are 0 answers