use of org.pentaho.di.trans.SubtransExecutor in project pentaho-kettle by pentaho.
the class BaseStreamStep method init.
@Override
public boolean init(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface) {
Preconditions.checkNotNull(stepMetaInterface);
variablizedStepMeta = (BaseStreamStepMeta) stepMetaInterface;
variablizedStepMeta.setParentStepMeta(getStepMeta());
variablizedStepMeta.setFileName(variablizedStepMeta.getTransformationPath());
boolean superInit = super.init(stepMetaInterface, stepDataInterface);
try {
TransMeta transMeta = TransExecutorMeta.loadMappingMeta(variablizedStepMeta, getTransMeta().getRepository(), getTransMeta().getMetaStore(), getParentVariableSpace());
variablizedStepMeta = (BaseStreamStepMeta) variablizedStepMeta.withVariables(this);
subtransExecutor = new SubtransExecutor(getStepname(), getTrans(), transMeta, true, new TransExecutorParameters(), variablizedStepMeta.getSubStep(), getPrefetchCount());
} catch (KettleException e) {
log.logError(e.getLocalizedMessage(), e);
return false;
}
List<CheckResultInterface> remarks = new ArrayList<>();
variablizedStepMeta.check(remarks, getTransMeta(), variablizedStepMeta.getParentStepMeta(), // these parameters are not used inside the method
null, // these parameters are not used inside the method
null, // these parameters are not used inside the method
null, // these parameters are not used inside the method
null, variables, getRepository(), getMetaStore());
boolean errorsPresent = remarks.stream().filter(result -> result.getType() == CheckResultInterface.TYPE_RESULT_ERROR).peek(result -> logError(result.getText())).count() > 0;
if (errorsPresent) {
return false;
}
return superInit;
}
Aggregations