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

Parse only required columns of CSV file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • SQL
    • None

    Description

      uniVocity parser allows to specify only required column names or indexes for parsing like:

      // Here we select only the columns by their indexes.
      // The parser just skips the values in other columns
      parserSettings.selectIndexes(4, 0, 1);
      CsvParser parser = new CsvParser(parserSettings);
      

      Need to modify UnivocityParser to extract only needed columns from requiredSchema

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: