public class ColumnTypeDetector extends Object
| Constructor and Description |
|---|
ColumnTypeDetector() |
ColumnTypeDetector(List<ColumnType> typeArrayOverrides) |
| Modifier and Type | Method and Description |
|---|---|
ColumnType[] |
detectColumnTypes(Iterator<String[]> rows,
ReadOptions options)
Estimates and returns the type for each column in the input text
|
public ColumnTypeDetector()
public ColumnTypeDetector(List<ColumnType> typeArrayOverrides)
public ColumnType[] detectColumnTypes(Iterator<String[]> rows, ReadOptions options)
The type is determined by checking a sample of the data. Because only a sample of the data is checked, the types may be incorrect. If that is the case a Parse Exception will be thrown.
The method printColumnTypes() can be used to print a list of the detected columns that can be
corrected and used to explicitly specify the correct column types.
Copyright © 2019. All rights reserved.