pentaho/pentaho-kettle · error · KettleException
FilterRows.CheckResult.FieldsNotFoundFromPreviousStep
FilterRows.CheckResult.FieldsNotFoundFromPreviousStep
Error message
FilterRows.CheckResult.FieldsNotFoundFromPreviousStep
What it means
During transformation validation, FilterRows.checkNonExistingFields verifies that every field referenced by the filter condition exists in the previous step's row metadata. If any are missing it builds a comma-separated list and throws this KettleException naming the fields that the previous step does not provide.
Solutions
- Read the error message's field list and re-open the Filter dialog to remove/re-select those fields from the actual incoming fields.
- Fix the upstream step so it outputs the missing fields (check its own configuration/preview).
- Use the 'Get fields' button in the condition editor so the field names match the current input metadata exactly.
Example fix
// before: condition references field 'cust_id' // after: upstream Select Values step aliases 'customer_id' -> 'cust_id', // or change the condition to use 'customer_id'
Defensive patterns
Strategy: validation
Validate before calling
// Check condition fields exist in the previous step's output before execution:
RowMetaInterface prev = transMeta.getPrevStepFields(stepMeta);
for (String field : ((FilterRowsMeta) stepMeta.getStepMeta()).getCondition().getUsedFields()) {
if (prev.searchValueMeta(field) == null) {
throw new IllegalStateException("Filter references missing field: " + field);
}
} Try / catch
try {
transMeta.checkSteps(remarks, ...);
} catch (KettleException e) {
if (e.getMessage().contains("FieldsNotFoundFromPreviousStep")) {
log.error("Fix filter condition fields: " + e.getMessage(), e);
}
throw e;
} Prevention
- Always populate the condition via the dialog's field list ('Get fields').
- Run transformation checks (Ctrl+T validate) before executing.
- Re-verify conditions after changing any upstream step's output fields.
When it happens
Trigger: check() -> checkNonExistingFields(): one or more fields used in the FilterRows Condition are absent from the incoming row metadata (prev RowMetaInterface), producing message 'fields not found from previous steps'.
Common situations: Upstream step renamed or removed a field; condition configured against fields from a step that is no longer the direct predecessor; typo in the condition's field list; transformation edited programmatically.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- AnalyticQueryMeta.Exception.SubjectFieldNotFound
- At least one slave server is required to be present in…
- AutoDoc.Exception.FilenameFieldNotFound
- AutoDoc.Exception.FileTypeFieldNotFound
- ChangeFileEncoding.Error.TargetFileIsEmpty
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/28b35bbab6cda9fa.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/filterrows/FilterRows.java:181
}
return false;
}
protected void checkNonExistingFields() throws KettleException {
List<String> orphanFields = meta.getOrphanFields(
meta.getCondition(), getInputRowMeta() );
if ( orphanFields != null && orphanFields.size() > 0 ) {
String fields = "";
boolean first = true;
for ( String field : orphanFields ) {
if ( !first ) {
fields += ", ";
}
fields += "'" + field + "'";
first = false;
}
String errorMsg = BaseMessages.getString( PKG, "FilterRows.CheckResult.FieldsNotFoundFromPreviousStep", fields );
throw new KettleException( errorMsg );
}
}
}
View on GitHub (pinned to f3058517a1)