{"record":{"id":"48d7f1573d68df2d","repo":"pentaho/pentaho-kettle","slug":"columnexists-error-columnnamefieldmissing","errorCode":null,"errorMessage":"ColumnExists.Error.ColumnnameFieldMissing","messagePattern":"ColumnExists\\.Error\\.ColumnnameFieldMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/columnexists/ColumnExists.java","lineNumber":71,"sourceCode":"    // if no more input to be expected set done\n    if ( r == null ) {\n      setOutputDone();\n      return false;\n    }\n\n    boolean columnexists = false;\n\n    if ( first ) {\n      first = false;\n\n      data.outputRowMeta = getInputRowMeta().clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // Check is columnname field is provided\n      if ( Utils.isEmpty( meta.getDynamicColumnnameField() ) ) {\n        logError( BaseMessages.getString( PKG, \"ColumnExists.Error.ColumnnameFieldMissing\" ) );\n        throw new KettleException( BaseMessages.getString( PKG, \"ColumnExists.Error.ColumnnameFieldMissing\" ) );\n      }\n      if ( meta.isTablenameInField() ) {\n        // Check is tablename field is provided\n        if ( Utils.isEmpty( meta.getDynamicTablenameField() ) ) {\n          logError( BaseMessages.getString( PKG, \"ColumnExists.Error.TablenameFieldMissing\" ) );\n          throw new KettleException( BaseMessages.getString( PKG, \"ColumnExists.Error.TablenameFieldMissing\" ) );\n        }\n\n        // cache the position of the field\n        if ( data.indexOfTablename < 0 ) {\n          data.indexOfTablename = getInputRowMeta().indexOfValue( meta.getDynamicTablenameField() );\n          if ( data.indexOfTablename < 0 ) {\n            // The field is unreachable !\n            logError( BaseMessages.getString( PKG, \"ColumnExists.Exception.CouldnotFindField\" ) + \"[\"\n                + meta.getDynamicTablenameField() + \"]\" );\n            throw new KettleException( BaseMessages.getString( PKG, \"ColumnExists.Exception.CouldnotFindField\",\n              meta.getDynamicTablenameField() ) );\n          }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/columnexists/ColumnExists.java#L53-L89","documentation":"ColumnExists.processRow checks that a dynamic columnname field was configured on the step before processing rows. If meta.getDynamicColumnnameField() is empty, it logs and throws a KettleException with this message. It is a configuration guard: the step needs to know which input field holds the column name to check for existence.","triggerScenarios":"Executing the Column Exists step without selecting a 'Columnname field' in the dialog, or with an empty value saved in the step metadata.","commonSituations":"Incomplete step configuration (user left the field blank), step metadata imported from XML/repository with the field dropped, copy-pasted step losing dialog settings.","solutions":["Open the Column Exists dialog and set the 'Columnname field' to the input field containing the column names","Re-save the transformation and re-run","Verify the step metadata XML/repository entry contains the columnname field setting","If the field is optional in your flow, switch to a statically configured column name"],"exampleFix":"// before\nDynamic columnname field: (empty)\n// after\nDynamic columnname field: column_name","handlingStrategy":"validation","validationCode":"// Before executing, check the step metadata\nif (meta.getDynamicColumnnameField() == null || meta.getDynamicColumnnameField().isEmpty()) {\n  throw new IllegalStateException(\"Columnname field must be configured on Column Exists step\");\n}","typeGuard":"boolean hasDynamicField(ColumnExistsMeta m) {\n  return m.getDynamicColumnnameField() != null && !m.getDynamicColumnnameField().isEmpty();\n}","tryCatchPattern":"try {\n  step.processRow();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"ColumnnameFieldMissing\")) {\n    // open step dialog, set Columnname field, re-run\n  }\n}","preventionTips":["Fill all required dialog fields before saving","Use the step's Check/verify button in Spoon","Review step config when copy-pasting steps between transformations"],"tags":["configuration","missing-field","pdi"],"backgroundTag":"missing-required-config-field","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"}