use of org.embulk.exec.GuessExecutor in project embulk by embulk.
the class FileInputRunner method guess.
public ConfigDiff guess(ConfigSource execConfig, ConfigSource inputConfig) {
final ConfigSource sampleBufferConfig = createSampleBufferConfigFromExecConfig(execConfig);
final Buffer sample = SamplingParserPlugin.runFileInputSampling(this, inputConfig, sampleBufferConfig);
// SamplingParserPlugin.runFileInputSampling throws NoSampleException if there're
// no files or all files are smaller than minSampleSize (40 bytes).
GuessExecutor guessExecutor = Exec.getInjector().getInstance(GuessExecutor.class);
return guessExecutor.guessParserConfig(sample, inputConfig, execConfig);
}
Aggregations