Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-25593

JDBC write Impala, `truncate` true option in Overwrite mode for JDBC DataFrameWriter is dropping and creating the table instead of truncating.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 2.3.2
    • None
    • SQL

    Description

      Scenario :

      Reading data from Impala using jdbc (cloudera jdbc41 driver) and writing to Impala with command write.mode(SaveMode.Overwrite).option("truncate", true)

      Observed:
      It's dropping and trying to create a new table. failing with exception

      CAUSED BY: Exception: Syntax error
      ), Query: CREATE TABLE jdbc_spark.persons_write_200 ("personid" INTEGER , "lastname" TEXT , "firstname" TEXT , "address"
      TEXT , "city" TEXT ).

      Expected :
      It should only truncate the table.

      Note : With SaveMode.Append it's working absolutely fine.

      relates to SPARK-16463

      Attachments

        Activity

          People

            Unassigned Unassigned
            rkesh_singh rakesh
            Dongjoon Hyun Dongjoon Hyun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: