Search in sources :

Example 1 with ColumnConfig

use of org.embulk.spi.ColumnConfig in project embulk by embulk.

the class Timestamps method newTimestampColumnParsers.

public static TimestampParser[] newTimestampColumnParsers(TimestampParser.Task parserTask, SchemaConfig schema) {
    TimestampParser[] parsers = new TimestampParser[schema.getColumnCount()];
    int i = 0;
    for (ColumnConfig column : schema.getColumns()) {
        if (column.getType() instanceof TimestampType) {
            TimestampColumnOption option = column.getOption().loadConfig(TimestampColumnOption.class);
            parsers[i] = TimestampParser.of(parserTask, option);
        }
        i++;
    }
    return parsers;
}
Also used : ColumnConfig(org.embulk.spi.ColumnConfig) TimestampParser(org.embulk.spi.time.TimestampParser) TimestampType(org.embulk.spi.type.TimestampType)

Aggregations

ColumnConfig (org.embulk.spi.ColumnConfig)1 TimestampParser (org.embulk.spi.time.TimestampParser)1 TimestampType (org.embulk.spi.type.TimestampType)1