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

Parse only required columns of CSV file

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: SQL
    • Labels:
      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

              • Assignee:
                maxgekk Maxim Gekk
                Reporter:
                maxgekk Maxim Gekk
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: