Class CsvUtils
- java.lang.Object
-
- net.sansa_stack.hadoop.format.commons_csv.csv.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 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.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)
-
-
-
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 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
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 streamscsvFormat
- The csv format for parsing the file- Returns:
- A cold flowable over the csv data
-
-