pentaho/pentaho-kettle · error · KettleStepException

Unable to find field [] in the input row!

Error message

Unable to find field [] in the input row!

What it means

TableOutput was configured with a partitioning field (used for date-based table partitioning), but that field could not be found in the input row. rowMeta.indexOfValue() returns -1, so the step throws immediately rather than silently partitioning on a nonexistent column.

Solutions

  1. Set the 'Partitioning field' in the TableOutput dialog to a field that actually exists in the input stream.
  2. Verify the date/partition column is produced upstream before TableOutput.
  3. Clear the partitioning field setting if partitioned tables are not actually needed.

Example fix

// before
meta.setPartitioningField( "OrderDate" ); // field is actually "order_date"
// after
meta.setPartitioningField( "order_date" );
Defensive patterns

Strategy: validation

Validate before calling

int idx = rowMeta.indexOfValue( partitioningFieldName );
if ( idx < 0 ) {
  throw new IllegalArgumentException(
    "Partitioning field '" + partitioningFieldName + "' missing from input row" );
}

Type guard

boolean hasPartitionField = rowMeta.searchValueMeta( partitioningFieldName ) != null;

Try / catch

try { processRow(); } catch ( KettleStepException e ) {
  if ( e.getMessage().startsWith( "Unable to find field" ) && e.getMessage().endsWith( "in the input row!" ) ) {
    // fix partitioning field configuration
  }
}

Prevention

When it happens

Trigger: meta.getPartitioningField() is non-empty (e.g. a date column name like 'order_date') but no field with that name exists in the incoming RowMeta when the first row reaches writeToTable.

Common situations: Renaming/removing the partitioning date column upstream; typo in the partitioning field setting; switching input streams without updating step config; a transformation variable used in the field name resolving to the wrong value.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/tableoutput/TableOutput.java:199

      }
      tableName = rowMeta.getString( r, data.indexOfTableNameField );
      if ( !meta.isTableNameInTable() && !meta.specifyFields() ) {
        // If the name of the table should not be inserted itself, remove the table name
        // from the input row data as well. This forcibly creates a copy of r
        //
        insertRowData = RowDataUtil.removeItem( rowMeta.cloneRow( r ), data.indexOfTableNameField );
      } else {
        insertRowData = r;
      }
    } else if ( meta.isPartitioningEnabled()
      && ( meta.isPartitioningDaily() || meta.isPartitioningMonthly() )
      && ( meta.getPartitioningField() != null && meta.getPartitioningField().length() > 0 ) ) {
      // Initialize some stuff!
      if ( data.indexOfPartitioningField < 0 ) {
        data.indexOfPartitioningField =
          rowMeta.indexOfValue( environmentSubstitute( meta.getPartitioningField() ) );
        if ( data.indexOfPartitioningField < 0 ) {
          throw new KettleStepException( "Unable to find field ["
            + meta.getPartitioningField() + "] in the input row!" );
        }

        if ( meta.isPartitioningDaily() ) {
          data.dateFormater = new SimpleDateFormat( "yyyyMMdd" );
        } else {
          data.dateFormater = new SimpleDateFormat( "yyyyMM" );
        }
      }

      ValueMetaInterface partitioningValue = rowMeta.getValueMeta( data.indexOfPartitioningField );
      if ( !partitioningValue.isDate() || r[data.indexOfPartitioningField] == null ) {
        throw new KettleStepException(
          "Sorry, the partitioning field needs to contain a data value and can't be empty!" );
      }

      Object partitioningValueData = rowMeta.getDate( r, data.indexOfPartitioningField );
      tableName =

View on GitHub (pinned to f3058517a1)