public final class SchemaGuess extends Object
It reimplements SchemaGuess in /embulk/guess/schema_guess.rb.
| Modifier and Type | Method and Description |
|---|---|
List<ConfigDiff> |
fromLinkedHashMapRecords(List<LinkedHashMap<String,Object>> listOfMap)
Guesses a schema from a list of sample records in
LinkedHashMaps. |
List<ConfigDiff> |
fromListRecords(List<String> columnNames,
List<List<Object>> samples)
Guesses a schema from a list of sample records in
LinkedHashMaps. |
static SchemaGuess |
of(ConfigMapperFactory configMapperFactory) |
public static SchemaGuess of(ConfigMapperFactory configMapperFactory)
public List<ConfigDiff> fromLinkedHashMapRecords(List<LinkedHashMap<String,Object>> listOfMap)
LinkedHashMaps.
It returns a list of ConfigDiff in contrast to the original Ruby method returning
Schema,
Note that it assumes LinkedHashMap because an order matters in schema.
listOfMap - a list of LinkedHashMaps which represent a record for eachConfigDiffs of the schema guessedpublic List<ConfigDiff> fromListRecords(List<String> columnNames, List<List<Object>> samples)
LinkedHashMaps.
It returns a list of ConfigDiff in contrast to the original Ruby method returning
Schema,
columnNames - a list of column names in ordersamples - a list of sample dataConfigDiffs of the schema guessed