Class CsvUtils


  • public class CsvUtils
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      CsvUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.univocity.parsers.csv.CsvParserSettings defaultSettings​(boolean skipHeaders)  
      static io.reactivex.rxjava3.core.Flowable<com.univocity.parsers.common.record.Record> readCsvRecords​(String path, org.apache.hadoop.fs.FileSystem fileSystem, com.univocity.parsers.csv.CsvParserSettings settings)
      Create a flowable to a CSV file via hadoop.
      static io.reactivex.rxjava3.core.Flowable<com.univocity.parsers.common.record.Record> readCsvRecords​(Callable<? extends InputStream> inSupp, com.univocity.parsers.csv.CsvParserSettings settings)
      Create a flowable to a CSV file from a supplier of input streams
      static io.reactivex.rxjava3.core.Flowable<com.univocity.parsers.common.record.Record> readCsvRecords​(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fileSystem, com.univocity.parsers.csv.CsvParserSettings settings)
      Create a flowable to a CSV file via hadoop.
      static io.reactivex.rxjava3.core.Flowable<String[]> readCsvRows​(String path, org.apache.hadoop.fs.FileSystem fileSystem, com.univocity.parsers.csv.CsvParserSettings settings)  
      static io.reactivex.rxjava3.core.Flowable<String[]> readCsvRows​(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fileSystem, com.univocity.parsers.csv.CsvParserSettings settings)  
    • Constructor Detail

      • CsvUtils

        public CsvUtils()
    • Method Detail

      • defaultSettings

        public static com.univocity.parsers.csv.CsvParserSettings defaultSettings​(boolean skipHeaders)
      • readCsvRecords

        public static io.reactivex.rxjava3.core.Flowable<com.univocity.parsers.common.record.Record> readCsvRecords​(String path,
                                                                                                                    org.apache.hadoop.fs.FileSystem fileSystem,
                                                                                                                    com.univocity.parsers.csv.CsvParserSettings settings)
        Create a flowable to a CSV file via hadoop. Allows for retrieval of headers.
        Parameters:
        path - A path (string) to a csv file
        fileSystem - The hadoop filesystem
        settings - The csv format for parsing the file
        Returns:
        A cold flowable over the csv data
      • readCsvRecords

        public static io.reactivex.rxjava3.core.Flowable<com.univocity.parsers.common.record.Record> readCsvRecords​(org.apache.hadoop.fs.Path path,
                                                                                                                    org.apache.hadoop.fs.FileSystem fileSystem,
                                                                                                                    com.univocity.parsers.csv.CsvParserSettings settings)
        Create a flowable to a CSV file via hadoop. Allows for retrieval of headers.
        Parameters:
        path - A path to a csv file
        fileSystem - The hadoop filesystem
        settings - The csv format for parsing the file
        Returns:
        A cold flowable over the csv data
      • readCsvRows

        public static io.reactivex.rxjava3.core.Flowable<String[]> readCsvRows​(org.apache.hadoop.fs.Path path,
                                                                               org.apache.hadoop.fs.FileSystem fileSystem,
                                                                               com.univocity.parsers.csv.CsvParserSettings settings)
      • readCsvRows

        public static io.reactivex.rxjava3.core.Flowable<String[]> readCsvRows​(String path,
                                                                               org.apache.hadoop.fs.FileSystem fileSystem,
                                                                               com.univocity.parsers.csv.CsvParserSettings settings)
      • readCsvRecords

        public static io.reactivex.rxjava3.core.Flowable<com.univocity.parsers.common.record.Record> readCsvRecords​(Callable<? extends InputStream> inSupp,
                                                                                                                    com.univocity.parsers.csv.CsvParserSettings settings)
        Create a flowable to a CSV file from a supplier of input streams
        Parameters:
        inSupp - A supplier of input streams
        settings - The csv format for parsing the file
        Returns:
        A cold flowable over the csv data