Package io.deephaven.importers.csv
Class CsvImportOptions
java.lang.Object
io.deephaven.importers.csv.CsvImportOptions
Defines options for a specific CSV import request so that they can be sent to a persistent query or the
CsvImport class.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder for creating instances ofCsvImportOptions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the list of column names to use for a headerless import.constant()Get the constant value.charGet the delimiter.Get the destination directory.Get the destination partitions into which the import will be written.Get the file format.static CsvImportOptions.BuilderCreate aCsvImportOptions.Builderwith the minimum required fields.static CsvImportOptions.BuilderfromStream(String namespace, String tableName, InputStream inputStream) Create aCsvImportOptions.Builderwith the minimum required fields and anInputStreamto read from instead of files.Get the import source from the schema.abstract Optional<InputStream>Get the inputInputStreamto use.Get the intraday partition column.abstract StringGet the namespace to import data into.booleannoHeader()Get the no-header value.Get the output mode.Get the partition formula.Get the partition substitution.abstract Optional<SchemaService>Get theSchemaService.abstract OptionalIntGet the skip footer lines value.abstract OptionalIntGet the skip lines value.Get the source directory.Get the source file.Get the source glob.booleanstrict()Get the strict value.Get the substitution date format.abstract StringGet the table name to import into.booleantrim()Get the trim value.
-
Constructor Details
-
CsvImportOptions
public CsvImportOptions()
-
-
Method Details
-
fromFiles
Create aCsvImportOptions.Builderwith the minimum required fields.- Parameters:
namespace- the namespace to import intotableName- 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 aCsvImportOptions.Builderwith the minimum required fields and anInputStreamto read from instead of files.- Parameters:
namespace- the namespace to import intotableName- the table name to import intoinputStream- the input stream to import from- Returns:
- the built
CsvImportOptions.Builder
-
namespace
Get the namespace to import data into.- Returns:
- the namespace
-
tableName
Get the table name to import into.- Returns:
- the table name
-
outputMode
Get the output mode. By defaultImportOutputMode.DEFAULT.- Returns:
- the output mode
-
intradayPartitionColumn
Get the intraday partition column.- Returns:
- the intraday partition column
-
partitionFormula
Get the partition formula.- Returns:
- the partition formula
-
importSource
Get the import source from the schema.- Returns:
- the import source
-
skipLines
Get the skip lines value.- Returns:
- the skip lines value
-
trim
@Default public boolean trim()Get the trim value. By default, isfalseunlessfileFormat()is "TRIM".- Returns:
- the trim value
-
constant
Get the constant value.- Returns:
- the constant value
-
schemaService
Get theSchemaService.- Returns:
- the schema service
-
noHeader
@Default public boolean noHeader()Get the no-header value. By default, isfalse.- Returns:
- the no-header value
-
fileFormat
Get the file format. This can be one ofCsvFormatsvalues, 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, isfalse.- Returns:
- the strict value
-
sourceDirectory
Get the source directory.- Returns:
- the source directory
-
partitionSubstitution
Get the partition substitution.- Returns:
- the partition substitution
-
substitutionDateFormat
Get the substitution date format.- Returns:
- the substitution date format
-
sourceFile
Get the source file.- Returns:
- the source file
-
sourceGlob
Get the source glob.- Returns:
- the source glob
-
inputStream
Get the inputInputStreamto use.- Returns:
- the stream
-
columnNames
Get the list of column names to use for a headerless import.- Returns:
- the list of column names
-
destinationPartitions
Get the destination partitions into which the import will be written.- Returns:
- the destination partitions
-
destinationDirectory
Get the destination directory.- Returns:
- the destination directory
-