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

Allow to add additional options when creating a new table in DF's JDBC writer.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.3, 2.1.0
    • Component/s: SQL
    • Labels:
      None

      Description

      We met some problem when trying to export Dataframe to external mysql thru JDBC driver (if the table doesn't exist). In general, Spark will create a new table automatically if it doesn't exist. However it doesn't support to add additional options when creating a new table.

      For example, we need to set the default "CHARSET=utf-8" in some customer's table. Otherwise, some UTF-8 columns cannot be exported to mysql successfully. Some encoding exception will be thrown and finally break the job.

        Attachments

          Activity

            People

            • Assignee:
              grace.huang Jie Huang
              Reporter:
              grace.huang Jie Huang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: