pentaho/pentaho-kettle · error · KettleException
GPLoadDataOutput.Exception.FieldNotFound
Error message
GPLoadDataOutput.Exception.FieldNotFound
What it means
writeLine() maps each configured field name to an index in the incoming row (RowMeta.indexOfValue). If a field listed in the step's 'field stream' is not present in the actual row, indexOfValue returns -1 and this KettleException is thrown naming the missing field.
Solutions
- Open the GPload step, reselect the fields from the current stream, and save (refreshes fieldStream metadata)
- Compare the configured field names with the actual row schema (use a Get Fields/preview) and fix names including case
- Ensure upstream steps do not rename or remove the referenced fields (check Select values / Filter rows)
- Re-run after re-saving so the cached field metadata is regenerated
Example fix
// before fieldStream = ["cust_id", "amt"] // row has "amount" not "amt" // after fieldStream = ["cust_id", "amount"]
Defensive patterns
Strategy: validation
Validate before calling
RowMetaInterface rowMeta = ...; // actual incoming row
for (String fieldName : meta.getFieldStream()) {
if (rowMeta.indexOfValue(fieldName) < 0) {
throw new IllegalStateException("Field not found in incoming row: " + fieldName);
}
} Type guard
boolean fieldsExist(RowMetaInterface row, GPLoadMeta m) {
return java.util.Arrays.stream(m.getFieldStream()).allMatch(f -> row.indexOfValue(f) >= 0);
} Try / catch
try { ... } catch (KettleException e) { if (e.getMessage().contains("FieldNotFound")) { logError("Missing field " + e.getMessage() + " — refresh GPload field mapping"); } throw e; } Prevention
- After any upstream schema change, re-open and re-save the GPload step so its field list refreshes
- Use Select values just before GPload to pin the expected schema and field names
- Match field-name case exactly — indexOfValue is case-sensitive
- Preview rows at the GPload input before running in production
When it happens
Trigger: A field name configured in the GPload step does not exist in the row arriving at the step — renamed upstream, filtered out, wrong case, or the step's cached field list is stale after upstream changes.
Common situations: Upstream step renamed/deleted a column; GPload dialog fields configured when a different stream layout existed (no re-open/re-save after edits); case-sensitive mismatch between configured and actual field names.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Unable to find field
- Calculator.Error.UnableFindField
- ConcatFields.Error.RemainingFieldNotFoundInputStream
- CreditCardValidator.Exception.CouldnotFindField
- Field [ ] couldn't be found in the input stream!
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/d062e8b154cad7b1.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoadDataOutput.java:159
}
delimiter = meta.getDelimiter();
if ( delimiter == null ) {
throw new KettleException( BaseMessages.getString( PKG, "GPload.Exception.DelimiterMissing" ) );
} else {
delimiter = gpLoad.environmentSubstitute( delimiter );
if ( Utils.isEmpty( delimiter ) ) {
throw new KettleException( BaseMessages.getString( PKG, "GPload.Exception.DelimiterMissing" ) );
}
}
// Setup up the fields we need to take for each of the rows
// as this speeds up processing.
fieldNumbers = new int[meta.getFieldStream().length];
for ( int i = 0; i < fieldNumbers.length; i++ ) {
fieldNumbers[i] = mi.indexOfValue( meta.getFieldStream()[i] );
if ( fieldNumbers[i] < 0 ) {
throw new KettleException( BaseMessages.getString( PKG, "GPLoadDataOutput.Exception.FieldNotFound", meta
.getFieldStream()[i] ) );
}
}
sdfDate = new SimpleDateFormat( "yyyy-MM-dd" );
sdfDateTime = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS" );
}
// Write the data to the output
ValueMetaInterface v = null;
int number = 0;
for ( int i = 0; i < fieldNumbers.length; i++ ) {
// TODO: variable substitution
if ( i != 0 ) {
output.print( delimiter );
}
number = fieldNumbers[i];View on GitHub (pinned to f3058517a1)