Search in sources :

Example 1 with MongoDbInput

use of org.pentaho.di.trans.steps.mongodbinput.MongoDbInput 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)

Aggregations

HashMap (java.util.HashMap)1 MongoDbInput (org.pentaho.di.trans.steps.mongodbinput.MongoDbInput)1 MongoDbInputMeta (org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta)1 MongoField (org.pentaho.mongo.wrapper.field.MongoField)1