{"record":{"id":"69f943ea3c436afd","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-field-in-the-input-row","errorCode":null,"errorMessage":"Unable to find field [] in the input row!","messagePattern":"Unable to find field \\[\\] in the input row!","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/tableoutput/TableOutput.java","lineNumber":199,"sourceCode":"      }\n      tableName = rowMeta.getString( r, data.indexOfTableNameField );\n      if ( !meta.isTableNameInTable() && !meta.specifyFields() ) {\n        // If the name of the table should not be inserted itself, remove the table name\n        // from the input row data as well. This forcibly creates a copy of r\n        //\n        insertRowData = RowDataUtil.removeItem( rowMeta.cloneRow( r ), data.indexOfTableNameField );\n      } else {\n        insertRowData = r;\n      }\n    } else if ( meta.isPartitioningEnabled()\n      && ( meta.isPartitioningDaily() || meta.isPartitioningMonthly() )\n      && ( meta.getPartitioningField() != null && meta.getPartitioningField().length() > 0 ) ) {\n      // Initialize some stuff!\n      if ( data.indexOfPartitioningField < 0 ) {\n        data.indexOfPartitioningField =\n          rowMeta.indexOfValue( environmentSubstitute( meta.getPartitioningField() ) );\n        if ( data.indexOfPartitioningField < 0 ) {\n          throw new KettleStepException( \"Unable to find field [\"\n            + meta.getPartitioningField() + \"] in the input row!\" );\n        }\n\n        if ( meta.isPartitioningDaily() ) {\n          data.dateFormater = new SimpleDateFormat( \"yyyyMMdd\" );\n        } else {\n          data.dateFormater = new SimpleDateFormat( \"yyyyMM\" );\n        }\n      }\n\n      ValueMetaInterface partitioningValue = rowMeta.getValueMeta( data.indexOfPartitioningField );\n      if ( !partitioningValue.isDate() || r[data.indexOfPartitioningField] == null ) {\n        throw new KettleStepException(\n          \"Sorry, the partitioning field needs to contain a data value and can't be empty!\" );\n      }\n\n      Object partitioningValueData = rowMeta.getDate( r, data.indexOfPartitioningField );\n      tableName =","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/tableoutput/TableOutput.java#L181-L217","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set the 'Partitioning field' in the TableOutput dialog to a field that actually exists in the input stream.","Verify the date/partition column is produced upstream before TableOutput.","Clear the partitioning field setting if partitioned tables are not actually needed."],"exampleFix":"// before\nmeta.setPartitioningField( \"OrderDate\" ); // field is actually \"order_date\"\n// after\nmeta.setPartitioningField( \"order_date\" );","handlingStrategy":"validation","validationCode":"int idx = rowMeta.indexOfValue( partitioningFieldName );\nif ( idx < 0 ) {\n  throw new IllegalArgumentException(\n    \"Partitioning field '\" + partitioningFieldName + \"' missing from input row\" );\n}","typeGuard":"boolean hasPartitionField = rowMeta.searchValueMeta( partitioningFieldName ) != null;","tryCatchPattern":"try { processRow(); } catch ( KettleStepException e ) {\n  if ( e.getMessage().startsWith( \"Unable to find field\" ) && e.getMessage().endsWith( \"in the input row!\" ) ) {\n    // fix partitioning field configuration\n  }\n}","preventionTips":["Keep the partitioning date column in the stream until after TableOutput (use 'Remove field' only downstream)","Validate field names after editing upstream transformations","Only set a partitioning field when partitioned tables are actually required"],"tags":["kettle","table-output","field-not-found","partitioning"],"backgroundTag":"record-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}