Package io.deephaven.importers
Class CsvSchemaCreator
java.lang.Object
io.deephaven.importers.CsvSchemaCreator
Reads a CSV file and attempts to infer column data types and create appropriate schema and importer instructions.
Also legalizes column names and adds corresponding ImportColumn entries for translation of column names.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbestFit()static CsvSchemaCreator.Builderbuilder()Creates a builder forCsvSchemaCreator.protected CasingStyleprotected voidprotected voidprotected voidprotected abstract @Nullable Stringprotected charprotected CsvFormatsReads the specified CSV file and attempts to infer column data types and create appropriate schema and importer.protected Loggerlogger()protected booleanprotected longmaxRows()protected abstract Stringprotected booleannoHeader()protected io.deephaven.shadow.enterprise.com.illumon.util.progress.StatusCallbackprogress()protected Stringprotected intprotected intprotected abstract @Nullable Fileprotected abstract Stringprotected abstract Stringprotected booleantrim()
-
Constructor Details
-
CsvSchemaCreator
public CsvSchemaCreator()
-
-
Method Details
-
builder
Creates a builder forCsvSchemaCreator.- Returns:
- the new builder
-
logger
-
progress
@Default protected io.deephaven.shadow.enterprise.com.illumon.util.progress.StatusCallback progress() -
namespace
-
tableName
-
groupingColumn
-
partitionColumn
-
sourceName
-
sourcePartitionColumn
-
fileFormat
-
delimiter
@Default protected char delimiter() -
skipHeaderLines
@Default protected int skipHeaderLines() -
sourceFile
-
csvString
-
bestFit
@Default protected boolean bestFit() -
trim
@Default protected boolean trim() -
noHeader
@Default protected boolean noHeader() -
columnNames
-
logProgress
@Default protected boolean logProgress() -
maxRows
@Default protected long maxRows() -
casingStyle
-
replacement
-
checkPartitionColumn
@Check protected void checkPartitionColumn() -
checkColumns
@Check protected void checkColumns() -
checkInputValues
@Check protected void checkInputValues() -
inferSchemaFromCsv
public String inferSchemaFromCsv() throws IOException, CsvFormatException, io.deephaven.csv.util.CsvReaderExceptionReads the specified CSV file and attempts to infer column data types and create appropriate schema and importer.- Returns:
- the created schema as a String
- Throws:
io.deephaven.csv.util.CsvReaderException- from the CSV readerCsvFormatException- from the CSV readerIOException- from the CSV reader
-