use of org.apache.druid.data.input.InputSource in project druid by druid-io.
the class ExternalTableMacro method apply.
@Override
public TranslatableTable apply(final List<Object> arguments) {
try {
final InputSource inputSource = jsonMapper.readValue((String) arguments.get(0), InputSource.class);
final InputFormat inputFormat = jsonMapper.readValue((String) arguments.get(1), InputFormat.class);
final RowSignature signature = jsonMapper.readValue((String) arguments.get(2), RowSignature.class);
return new DruidTable(new ExternalDataSource(inputSource, inputFormat, signature), signature, jsonMapper, false, false);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
Aggregations