Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-2109

config of dataframe load with tempCSV is invalid ,such as QUOTECHAR

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.0
    • 1.3.0
    • data-load
    • None

    Description

      use datafame to load data with tempCSV true(dataset.writer..format("carbondata").save), carbondata will generate sql to load data
      the sql's configs only have SINGLE_PASS, other configs is invalid,such as QUOTECHAR.
      the code is in CarbonDataFrameWriter:

      private def makeLoadString(csvFolder: String, options: CarbonOption): String = {
      val dbName = CarbonEnv.getDatabaseName(options.dbName)(sqlContext.sparkSession)
      s"""

      LOAD DATA INPATH '$csvFolder'
      INTO TABLE $dbName.${options.tableName}
      OPTIONS ('FILEHEADER' = '${dataFrame.columns.mkString(",")}',
      'SINGLE_PASS' = '${options.singlePass}')
      """.stripMargin
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              qiuchenjian Chenjian Qiu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h