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 Tables
  • Constructor Details

  • Method Details

    • readCsv

      @ScriptApi public static Table readCsv​(InputStream is, String format) throws IOException
      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 IOException
      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.
      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

      @ScriptApi public static Table readCsv​(InputStream is, char separator) throws IOException
      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 IOException
      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.
      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

      @ScriptApi public static QueryTable readCsv2​(InputStream is, char separator) throws IOException
      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

      @ScriptApi public static Table readCsv​(InputStream is) throws IOException
      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

      @ScriptApi public static Table readCsv​(InputStream is, StatusCallback progress) throws IOException
      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

      public static QueryTable readCsv2​(InputStream is) throws IOException
      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