use of org.pentaho.di.trans.DatabaseImpact in project pentaho-kettle by pentaho.
the class CombinationLookupMeta method analyseImpact.
@Override
public void analyseImpact(List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository, IMetaStore metaStore) {
// The keys are read-only...
for (int i = 0; i < keyField.length; i++) {
ValueMetaInterface v = prev.searchValueMeta(keyField[i]);
DatabaseImpact ii = new DatabaseImpact(DatabaseImpact.TYPE_IMPACT_READ_WRITE, transMeta.getName(), stepMeta.getName(), databaseMeta.getDatabaseName(), tablename, keyLookup[i], keyField[i], v != null ? v.getOrigin() : "?", "", useHash ? BaseMessages.getString(PKG, "CombinationLookupMeta.ReadAndInsert.Label") : BaseMessages.getString(PKG, "CombinationLookupMeta.LookupAndInsert.Label"));
impact.add(ii);
}
// Do we lookup-on the hash-field?
if (useHash) {
DatabaseImpact ii = new DatabaseImpact(DatabaseImpact.TYPE_IMPACT_READ_WRITE, transMeta.getName(), stepMeta.getName(), databaseMeta.getDatabaseName(), tablename, hashField, "", "", "", BaseMessages.getString(PKG, "CombinationLookupMeta.KeyLookup.Label"));
impact.add(ii);
}
}
Aggregations