Class CsvImportOptions

java.lang.Object
io.deephaven.importers.csv.CsvImportOptions

@Immutable public abstract class CsvImportOptions extends Object
Defines options for a specific CSV import request so that they can be sent to a persistent query or the CsvImport class.
  • Constructor Details

    • CsvImportOptions

      public CsvImportOptions()
  • Method Details

    • fromFiles

      @ScriptApi public static CsvImportOptions.Builder fromFiles(String namespace, String tableName)
      Create a CsvImportOptions.Builder with the minimum required fields.
      Parameters:
      namespace - the namespace to import into
      tableName - the table name to import into
      Returns:
      the built CsvImportOptions.Builder
    • fromStream

      @ScriptApi public static CsvImportOptions.Builder fromStream(String namespace, String tableName, InputStream inputStream)
      Create a CsvImportOptions.Builder with the minimum required fields and an InputStream to read from instead of files.
      Parameters:
      namespace - the namespace to import into
      tableName - the table name to import into
      inputStream - the input stream to import from
      Returns:
      the built CsvImportOptions.Builder
    • namespace

      public abstract String namespace()
      Get the namespace to import data into.
      Returns:
      the namespace
    • tableName

      public abstract String tableName()
      Get the table name to import into.
      Returns:
      the table name
    • outputMode

      @Default public ImportOutputMode outputMode()
      Get the output mode. By default ImportOutputMode.DEFAULT.
      Returns:
      the output mode
    • intradayPartitionColumn

      public abstract Optional<String> intradayPartitionColumn()
      Get the intraday partition column.
      Returns:
      the intraday partition column
    • partitionFormula

      public abstract Optional<String> partitionFormula()
      Get the partition formula.
      Returns:
      the partition formula
    • importSource

      public abstract Optional<String> importSource()
      Get the import source from the schema.
      Returns:
      the import source
    • skipLines

      public abstract OptionalInt skipLines()
      Get the skip lines value.
      Returns:
      the skip lines value
    • skipFooterLines

      public abstract OptionalInt skipFooterLines()
      Get the skip footer lines value.
      Returns:
      the skip footer lines value
    • trim

      @Default public boolean trim()
      Get the trim value. By default, is false unless fileFormat() is "TRIM".
      Returns:
      the trim value
    • constant

      public abstract Optional<String> constant()
      Get the constant value.
      Returns:
      the constant value
    • schemaService

      public abstract Optional<SchemaService> schemaService()
      Get the SchemaService.
      Returns:
      the schema service
    • noHeader

      @Default public boolean noHeader()
      Get the no-header value. By default, is false.
      Returns:
      the no-header value
    • fileFormat

      public abstract Optional<String> fileFormat()
      Get the file format. This can be one of CsvFormats values, or a single character delimiter in which case delimiter() is ignored.
      Returns:
      the file format
    • delimiter

      @Default public char delimiter()
      Get the delimiter.
      Returns:
      the delimiter
    • strict

      @Default public boolean strict()
      Get the strict value. By default, is false.
      Returns:
      the strict value
    • sourceDirectory

      public abstract Optional<String> sourceDirectory()
      Get the source directory.
      Returns:
      the source directory
    • partitionSubstitution

      public abstract Optional<String> partitionSubstitution()
      Get the partition substitution.
      Returns:
      the partition substitution
    • substitutionDateFormat

      public abstract Optional<String> substitutionDateFormat()
      Get the substitution date format.
      Returns:
      the substitution date format
    • sourceFile

      public abstract Optional<String> sourceFile()
      Get the source file.
      Returns:
      the source file
    • sourceGlob

      public abstract Optional<String> sourceGlob()
      Get the source glob.
      Returns:
      the source glob
    • inputStream

      public abstract Optional<InputStream> inputStream()
      Get the input InputStream to use.
      Returns:
      the stream
    • columnNames

      public abstract Optional<List<String>> columnNames()
      Get the list of column names to use for a headerless import.
      Returns:
      the list of column names
    • destinationPartitions

      public abstract Optional<String> destinationPartitions()
      Get the destination partitions into which the import will be written.
      Returns:
      the destination partitions
    • destinationDirectory

      public abstract Optional<File> destinationDirectory()
      Get the destination directory.
      Returns:
      the destination directory