java.lang.Object
net.sansa_stack.hadoop.format.commons_csv.csv.CsvUtils

public class CsvUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CsvUtils

      public CsvUtils()
  • Method Details

    • 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