pentaho/pentaho-kettle · error · KettleException

TransExecutor.Exception.UnableToFindField

Error message

TransExecutor.Exception.UnableToFindField

What it means

SubtransExecutor.passParametersToTrans() maps fields from the executor's input row into the executed sub-transformation's parameters. For each configured parameter field name, it looks up the field in rowMetaAndData; if the field name is not found in the row metadata, this KettleException is thrown.

Solutions

  1. In the TransExecutor step's Parameters tab, set each field to an existing column of the incoming stream
  2. Preview the stream feeding the executor to confirm the field names
  3. Remove the field name (leave it empty) and use a static input value with environment substitution instead

Example fix

// before
parameters.getField()[0] = "oldOrderId";
// after
parameters.getField()[0] = "orderId"; // exists in input row
Defensive patterns

Strategy: validation

Validate before calling

for (String f : parameters.getField()) {
  if (!Utils.isEmpty(f) && rowMeta.indexOfValue(f) < 0) {
    throw new IllegalArgumentException("Parameter field '" + f + "' missing from input row");
  }
}

Try / catch

try { subtransExecutor.execute(row); } catch (KettleException e) { log.error("Parameter field lookup failed: " + e.getMessage()); }

Prevention

When it happens

Trigger: TransExecutor (or SubtransExecutor.execute) configured with a field name in the parameters mapping that does not exist in the row being passed to the sub-transformation.

Common situations: The executing transformation's row layout changed (field renamed/dropped) after configuring the sub-transformation parameter mapping; mismatch between the configured 'field value' source column and actual stream fields.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/dae61ee9044ffee9. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/SubtransExecutor.java:153

    subTrans.copyParametersFrom( this.subtransMeta );
    subTrans.setPreview( this.parentTrans.isPreview() );
    TransStepUtil.initServletConfig( this.parentTrans, subTrans );
    return subTrans;
  }

  private void passParametersToTrans( Trans internalTrans, RowMetaAndData rowMetaAndData ) throws KettleException {
    internalTrans.clearParameters();
    String[] parameterNames = internalTrans.listParameters();

    for ( int i = 0; i < this.parameters.getVariable().length; ++i ) {
      String variable = this.parameters.getVariable()[ i ];
      String fieldName = this.parameters.getField()[ i ];
      String inputValue = this.parameters.getInput()[ i ];
      String value;
      if ( !Utils.isEmpty( fieldName ) ) {
        int idx = rowMetaAndData.getRowMeta().indexOfValue( fieldName );
        if ( idx < 0 ) {
          throw new KettleException(
            BaseMessages.getString( PKG, "TransExecutor.Exception.UnableToFindField", fieldName ) );
        }

        value = rowMetaAndData.getString( idx, "" );
      } else {
        value = this.parentTrans.environmentSubstitute( inputValue );
      }

      if ( Const.indexOfString( variable, parameterNames ) < 0 ) {
        internalTrans.setVariable( variable, Const.NVL( value, "" ) );
      } else {
        internalTrans.setParameterValue( variable, Const.NVL( value, "" ) );
      }
    }

    internalTrans.activateParameters();
  }

View on GitHub (pinned to f3058517a1)