{"record":{"id":"a8e4f265bc4e280f","repo":"pentaho/pentaho-kettle","slug":"dimensionlookup-exception-startdatevaluecolumnnotfound","errorCode":null,"errorMessage":"DimensionLookup.Exception.StartDateValueColumnNotFound","messagePattern":"DimensionLookup\\.Exception\\.StartDateValueColumnNotFound","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/dimensionlookup/DimensionLookup.java","lineNumber":140,"sourceCode":"      // Get the fields that need conversion to normal storage...\n      // Modify the storage type of the input data...\n      //\n      data.lazyList = new ArrayList<Integer>();\n      for ( int i = 0; i < data.inputRowMeta.size(); i++ ) {\n        ValueMetaInterface valueMeta = data.inputRowMeta.getValueMeta( i );\n        if ( valueMeta.isStorageBinaryString() ) {\n          data.lazyList.add( i );\n          valueMeta.setStorageType( ValueMetaInterface.STORAGE_TYPE_NORMAL );\n        }\n      }\n\n      // The start date value column (if applicable)\n      //\n      data.startDateFieldIndex = -1;\n      if ( data.startDateChoice == DimensionLookupMeta.START_DATE_ALTERNATIVE_COLUMN_VALUE ) {\n        data.startDateFieldIndex = data.inputRowMeta.indexOfValue( meta.getStartDateFieldName() );\n        if ( data.startDateFieldIndex < 0 ) {\n          throw new KettleStepException( BaseMessages.getString(\n            PKG, \"DimensionLookup.Exception.StartDateValueColumnNotFound\", meta.getStartDateFieldName() ) );\n        }\n      }\n\n      // Lookup values\n      data.keynrs = new int[ meta.getKeyStream().length ];\n      for ( int i = 0; i < meta.getKeyStream().length; i++ ) {\n        // logDetailed(\"Lookup values key[\"+i+\"] --> \"+key[i]+\", row==null?\"+(row==null));\n        data.keynrs[ i ] = data.inputRowMeta.indexOfValue( meta.getKeyStream()[ i ] );\n        if ( data.keynrs[ i ] < 0 ) { // couldn't find field!\n          throw new KettleStepException( BaseMessages.getString(\n            PKG, \"DimensionLookup.Exception.KeyFieldNotFound\", meta.getKeyStream()[ i ] ) );\n        }\n      }\n\n      // Return values\n      data.fieldnrs = new int[ meta.getFieldStream().length ];\n      for ( int i = 0; meta.getFieldStream() != null && i < meta.getFieldStream().length; i++ ) {","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/dimensionlookup/DimensionLookup.java#L122-L158","documentation":"When the DimensionLookup step is configured with start-date alternative 'value of column', the step locates the start-date source column in the incoming row's row metadata. If that column (meta.getStartDateFieldName()) is absent from the input stream, data.startDateFieldIndex stays -1 and this KettleStepException is thrown, stopping the step.","triggerScenarios":"processRow with data.startDateChoice == START_DATE_ALTERNATIVE_COLUMN_VALUE and inputRowMeta.indexOfValue(startDateFieldName) < 0, i.e. the configured 'Date field of start value' column is not present on the incoming rows.","commonSituations":"Renaming or removing the date column in an upstream step after configuring DimensionLookup; wiring the wrong hop so rows lack the column; copying a transformation between environments where field layouts changed; selecting the start-date column option but never adding the field upstream.","solutions":["Open the DimensionLookup step and correct the 'Date field of start value' (start date column) name to match the actual incoming field.","Add or rename the column upstream so the input stream supplies the configured start-date field.","Use 'Get fields' in the step dialog to re-sync configured field names with the current input row metadata.","Verify with a preview of the preceding step that the start-date column exists in the row layout."],"exampleFix":"// before: configured column no longer in the stream\n// meta.setStartDateFieldName(\"START_DATE_OLD\");\n// after: match the real upstream field name\n// meta.setStartDateFieldName(\"START_DATE\");","handlingStrategy":"validation","validationCode":"// In the step or before it, verify the field exists:\n// if (inputRowMeta.indexOfValue(startDateFieldName) < 0) {\n//   throw new KettleStepException(\"Missing start date column: \" + startDateFieldName);\n// }","typeGuard":null,"tryCatchPattern":"try {\n  // step execution\n} catch (KettleStepException e) {\n  if (e.getMessage().contains(\"StartDateValueColumnNotFound\")) {\n    // fix the start-date field configuration and restart the transformation\n  } else throw e;\n}","preventionTips":["After renaming fields upstream, always re-open DimensionLookup and re-map fields.","Use step previews to confirm input layout before production runs.","Keep field names consistent across environments via naming conventions.","Prefer 'Get fields' over hand-typing field names in the dialog."],"tags":["kettle","pdi","dimension-lookup","missing-field","step-config"],"backgroundTag":"resource-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"}