Search in sources :

Example 1 with MongoDbInputMeta

use of org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta in project pdi-dataservice-server-plugin by pentaho.

the class MongodbInputParameterGeneration method getFieldMappings.

protected Map<String, String> getFieldMappings(StepInterface stepInterface) {
    Map<String, String> fieldMap = new HashMap<String, String>();
    MongoDbInput mongoDbInput = (MongoDbInput) stepInterface;
    MongoDbInputMeta mongoDbInputMeta = (MongoDbInputMeta) mongoDbInput.getStepMeta().getStepMetaInterface();
    for (MongoField mongoField : mongoDbInputMeta.getMongoFields()) {
        fieldMap.put(mongoField.getName(), mongoField.getPath());
    }
    return fieldMap;
}
Also used : HashMap(java.util.HashMap) MongoDbInput(org.pentaho.di.trans.steps.mongodbinput.MongoDbInput) MongoDbInputMeta(org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta) MongoField(org.pentaho.mongo.wrapper.field.MongoField)

Example 2 with MongoDbInputMeta

use of org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta in project pdi-dataservice-server-plugin by pentaho.

the class MongoDbBasicValidation method checkStep.

@Override
public void checkStep(CheckStepsExtension checkStepExtension, DataServiceMeta dataServiceMeta, LogChannelInterface log) {
    StepMeta stepMeta = checkStepExtension.getStepMetas()[0];
    List<CheckResultInterface> remarks = checkStepExtension.getRemarks();
    MongoDbInputMeta mongoDbMeta = (MongoDbInputMeta) checkStepExtension.getStepMetas()[0].getStepMetaInterface();
    VariableSpace space = checkStepExtension.getVariableSpace();
    checkOutputJson(stepMeta, remarks, mongoDbMeta);
    checkPushdownParameter(stepMeta, remarks, mongoDbMeta, space);
    checkParameterGenerationOptimizedMeta(checkStepExtension, dataServiceMeta, log);
}
Also used : VariableSpace(org.pentaho.di.core.variables.VariableSpace) MongoDbInputMeta(org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta) CheckResultInterface(org.pentaho.di.core.CheckResultInterface) StepMeta(org.pentaho.di.trans.step.StepMeta)

Aggregations

MongoDbInputMeta (org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta)2 HashMap (java.util.HashMap)1 CheckResultInterface (org.pentaho.di.core.CheckResultInterface)1 VariableSpace (org.pentaho.di.core.variables.VariableSpace)1 StepMeta (org.pentaho.di.trans.step.StepMeta)1 MongoDbInput (org.pentaho.di.trans.steps.mongodbinput.MongoDbInput)1 MongoField (org.pentaho.mongo.wrapper.field.MongoField)1