Class CsvUtils
java.lang.Object
net.sansa_stack.hadoop.format.commons_csv.csv.CsvUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 streamsstatic 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.readCsvRows(String path, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.commons.csv.CSVFormat csvFormat) readCsvRows(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.commons.csv.CSVFormat csvFormat)
-
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 filefileSystem- The hadoop filesystemcsvFormat- 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 filefileSystem- The hadoop filesystemcsvFormat- The csv format for parsing the file- Returns:
- A cold flowable over the csv data
-
readCsvRows
-
readCsvRows
-
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 streamscsvFormat- The csv format for parsing the file- Returns:
- A cold flowable over the csv data
-