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 io.reactivex.rxjava3.core.Flowable<org.apache.commons.csv.CSVRecord> readCsvRecords​(String path, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.commons.csv.CSVFormat csvFormat)
      Create a flowable to a CSV file via hadoop.
      static io.reactivex.rxjava3.core.Flowable<org.apache.commons.csv.CSVRecord> readCsvRecords​(Callable<? extends InputStream> inSupp, org.apache.commons.csv.CSVFormat csvFormat)
      Create a flowable to a CSV file from a supplier of input streams
      static io.reactivex.rxjava3.core.Flowable<org.apache.commons.csv.CSVRecord> readCsvRecords​(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.commons.csv.CSVFormat csvFormat)
      Create a flowable to a CSV file via hadoop.
      static io.reactivex.rxjava3.core.Flowable<List<String>> readCsvRows​(String path, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.commons.csv.CSVFormat csvFormat)  
      static io.reactivex.rxjava3.core.Flowable<List<String>> readCsvRows​(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.commons.csv.CSVFormat csvFormat)  
    • Constructor Detail

      • CsvUtils

        public CsvUtils()
    • Method Detail

      • readCsvRecords

        public static io.reactivex.rxjava3.core.Flowable<org.apache.commons.csv.CSVRecord> readCsvRecords​(String path,
                                                                                                          org.apache.hadoop.fs.FileSystem fileSystem,
                                                                                                          org.apache.commons.csv.CSVFormat csvFormat)
        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
        csvFormat - The csv format for parsing the file
        Returns:
        A cold flowable over the csv data
      • readCsvRecords

        public static io.reactivex.rxjava3.core.Flowable<org.apache.commons.csv.CSVRecord> readCsvRecords​(org.apache.hadoop.fs.Path path,
                                                                                                          org.apache.hadoop.fs.FileSystem fileSystem,
                                                                                                          org.apache.commons.csv.CSVFormat csvFormat)
        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
        csvFormat - The csv format for parsing the file
        Returns:
        A cold flowable over the csv data
      • readCsvRows

        public static io.reactivex.rxjava3.core.Flowable<List<String>> readCsvRows​(org.apache.hadoop.fs.Path path,
                                                                                   org.apache.hadoop.fs.FileSystem fileSystem,
                                                                                   org.apache.commons.csv.CSVFormat csvFormat)
      • readCsvRows

        public static io.reactivex.rxjava3.core.Flowable<List<String>> readCsvRows​(String path,
                                                                                   org.apache.hadoop.fs.FileSystem fileSystem,
                                                                                   org.apache.commons.csv.CSVFormat csvFormat)
      • readCsvRecords

        public static io.reactivex.rxjava3.core.Flowable<org.apache.commons.csv.CSVRecord> readCsvRecords​(Callable<? extends InputStream> inSupp,
                                                                                                          org.apache.commons.csv.CSVFormat csvFormat)
        Create a flowable to a CSV file from a supplier of input streams
        Parameters:
        inSupp - A supplier of input streams
        csvFormat - The csv format for parsing the file
        Returns:
        A cold flowable over the csv data