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

Spark sql carries newline char from last csv column when imported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 2.4.0
    • None
    • Spark Core

    Description

      I am trying to generate external sql tables in DataBricks using Spark sql query. Below is my query. The query reads csv file and creates external table but it carries the newline char while creating the last column. Is there a way to resolve this issue? 

       

      %sql
      create table if not exists <<My table name>>
      using CSV
      options ("header"="true", "inferschema"="true","multiLine"="true", "escape"='"')
      location <my csv path>

      Attachments

        1. TestFile.csv
          0.0 kB
          Raj
        2. image-2019-02-04-12-28-21-117.png
          109 kB
          Raj
        3. image-2019-02-04-12-09-19-210.png
          44 kB
          Raj

        Activity

          People

            Unassigned Unassigned
            hipruthvi Raj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: