Package com.illumon.iris.db.tables.utils
Class LegacyCsvHelpers
java.lang.Object
com.illumon.iris.db.tables.utils.LegacyCsvHelpers
public class LegacyCsvHelpers extends Object
Utilities for reading and writing CSV files to and from
Table
s-
Constructor Summary
Constructors Constructor Description LegacyCsvHelpers()
-
Method Summary
Modifier and Type Method Description static Table
readCsv(InputStream is)
Returns a memory table created by importing CSV data.static Table
readCsv(InputStream is, char separator)
Returns a memory table created by importing CSV data.static Table
readCsv(InputStream is, char separator, StatusCallback progress)
Returns a memory table created by importing CSV data.static Table
readCsv(InputStream is, StatusCallback progress)
Returns a memory table created by importing CSV data.static Table
readCsv(InputStream is, String format)
Returns a memory table created by importing CSV data.static Table
readCsv(InputStream is, String format, StatusCallback progress)
Returns a memory table created by importing CSV data.static QueryTable
readCsv2(InputStream is)
Returns a memory table created by importing CSV data.static QueryTable
readCsv2(InputStream is, char separator)
Returns a memory table created by importing CSV data.
-
Constructor Details
-
LegacyCsvHelpers
public LegacyCsvHelpers()
-
-
Method Details
-
readCsv
Returns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.format
- an Apache Commons CSV format name to be used to parse the CSV, or a single non-newline character to use as a delimiter.- Returns:
- a Deephaven Table object
- Throws:
IOException
- if the InputStream cannot be read
-
readCsv
@ScriptApi public static Table readCsv(InputStream is, String format, StatusCallback progress) throws IOExceptionReturns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.format
- an Apache Commons CSV format name to be used to parse the CSV, or a single non-newline character to use as a delimiter.progress
- a StatusCallback object that can be used to log progress details or update a progress bar. If passed explicitly as null, a StatusCallback instance will be created to log progress to the current logger.- Returns:
- a Deephaven Table object
- Throws:
IOException
- if the InputStream cannot be read
-
readCsv
Returns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.separator
- a char to use as the delimiter value when parsing the file.- Returns:
- a Deephaven Table object
- Throws:
IOException
- if the InputStream cannot be read
-
readCsv
@ScriptApi public static Table readCsv(InputStream is, char separator, StatusCallback progress) throws IOExceptionReturns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.separator
- a char to use as the delimiter value when parsing the file.progress
- a StatusCallback object that can be used to log progress details or update a progress bar. If passed explicitly as null, a StatusCallback instance will be created to log progress to the current logger.- Returns:
- a Deephaven Table object
- Throws:
IOException
- if the InputStream cannot be read
-
readCsv2
Returns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.separator
- a char to use as the delimiter value when parsing the file.- Returns:
- an Iris QueryTable object
- Throws:
IOException
- if the InputStream cannot be read
-
readCsv
Returns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.- Returns:
- a Deephaven Table object
- Throws:
IOException
- if the InputStream cannot be read
-
readCsv
Returns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.progress
- a StatusCallback object that can be used to log progress details or update a progress bar. If passed explicitly as null, a StatusCallback instance will be created to log progress to the current logger.- Returns:
- a Deephaven Table object
- Throws:
IOException
- if the InputStream cannot be read
-
readCsv2
Returns a memory table created by importing CSV data. The first row must be column names. Column data types are inferred from the data.- Parameters:
is
- an InputStream providing access to the CSV data.- Returns:
- an Iris QueryTable object
- Throws:
IOException
- if the InputStream cannot be read
-