{"record":{"id":"b9333d35ecc2858b","repo":"pentaho/pentaho-kettle","slug":"the-table-name-is-not-specified-or-the-input-field-is-empty","errorCode":null,"errorMessage":"The table name is not specified (or the input field is empty)","messagePattern":"The table name is not specified \\(or the input field is empty\\)","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMerge.java","lineNumber":676,"sourceCode":"      data.inputRowMeta = data.outputRowMeta;\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      if ( meta.istablenameInField() ) {\n        // Cache the position of the table name field\n        if ( data.indexOfTableNameField < 0 ) {\n          data.indexOfTableNameField = data.inputRowMeta.indexOfValue( meta.gettablenameField() );\n          if ( data.indexOfTableNameField < 0 ) {\n            String message =\n              \"It was not possible to find table [\" + meta.gettablenameField() + \"] in the input fields.\";\n            logError( message );\n            throw new KettleStepException( message );\n          }\n        }\n      } else {\n        data.realTableName = environmentSubstitute( meta.getTableName() );\n        if ( Utils.isEmpty( data.realTableName ) ) {\n          throw new KettleStepException( \"The table name is not specified (or the input field is empty)\" );\n        }\n        data.realSchemaTable =\n          data.db.getDatabaseMeta().getQuotedSchemaTableCombination( data.realSchemaName, data.realTableName );\n      }\n\n      // Cache the position of the operation order field\n      if ( data.indexOfOperationOrderField < 0 ) {\n        data.indexOfOperationOrderField = data.inputRowMeta.indexOfValue( meta.getOperationOrderField() );\n        if ( data.indexOfOperationOrderField < 0 ) {\n          String message =\n            \"It was not possible to find operation field [\" + meta.getOperationOrderField()\n              + \"] in the input stream!\";\n          logError( message );\n          throw new KettleStepException( message );\n        }\n      }\n\n      data.insertValue = environmentSubstitute( meta.getOrderInsert() );","sourceCodeStart":658,"sourceCodeEnd":694,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMerge.java#L658-L694","documentation":"Thrown during processRow() initialization when the target table name is taken from the step configuration (not a field) and environmentSubstitute(meta.getTableName()) resolves to an empty string. The step requires a concrete table name to build its SQL.","triggerScenarios":"meta.istablenameInField() is false; the 'Target table' field in the dialog is empty, or the environment variable used in the table name (e.g. ${TARGET_TABLE}) is unset or empty at runtime.","commonSituations":"User forgot to type the table name in the dialog; table name was parameterized with an environment variable that is not defined in the job/kitchen environment; variable typo so it substitutes to empty.","solutions":["Enter the target table name in the step dialog's 'Target table' field.","If using a variable like ${TARGET_TABLE}, define it in the transformation/job settings, kettle.properties, or via Set Variables.","Test with the variable value echoed (e.g. a 'Write to log' step or Get Variables) to confirm it substitutes non-empty.","If the table name should come from the data, switch on 'table name defined in a field' instead."],"exampleFix":"// before (kettle.properties missing)\n// TARGET_TABLE not defined -> substitutes to \"\"\n// after\nTARGET_TABLE=customers","handlingStrategy":"validation","validationCode":"String table = environmentSubstitute(\"${TARGET_TABLE}\");\nif (table == null || table.trim().isEmpty()) {\n  throw new ValidationException(\"TARGET_TABLE variable is not set\");\n}","typeGuard":null,"tryCatchPattern":"catch (KettleStepException e) {\n  if (e.getMessage().contains(\"table name is not specified\")) {\n    logError(\"Set the Target table or define its environment variable.\");\n  }\n  throw e;\n}","preventionTips":["Always fill the Target table field or enable the field-based option.","Define parameterized table-name variables in kettle.properties or via Set Variables before running.","Smoke-test transformations with variables resolved (kitchen logs show substitutions)."],"tags":["configuration","environment-variable","pentaho-kettle"],"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"}