{"record":{"id":"b8cd55dd3290bead","repo":"pentaho/pentaho-kettle","slug":"the-name-of-the-table-is-not-specified","errorCode":null,"errorMessage":"The name of the table is not specified!","messagePattern":"The name of the table is not specified!","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMerge.java","lineNumber":86,"sourceCode":"    boolean batchProblem = false;\n\n    data.lookupFailure = false;\n    boolean performInsert = false;\n    boolean performUpdate = false;\n    boolean performDelete = false;\n    boolean lineSkipped = false;\n\n    try {\n      if ( operation == null ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"SynchronizeAfterMerge.Log.OperationFieldEmpty\", meta\n          .getOperationOrderField() ) );\n      }\n\n      if ( meta.istablenameInField() ) {\n        // get dynamic table name\n        data.realTableName = data.inputRowMeta.getString( row, data.indexOfTableNameField );\n        if ( Utils.isEmpty( data.realTableName ) ) {\n          throw new KettleStepException( \"The name of the table is not specified!\" );\n        }\n        data.realSchemaTable =\n          data.db.getDatabaseMeta().getQuotedSchemaTableCombination( data.realSchemaName, data.realTableName );\n      }\n\n      if ( operation.equals( data.insertValue ) ) {\n        // directly insert data into table\n        /*\n         *\n         * INSERT ROW\n         */\n\n        if ( log.isRowLevel() ) {\n          logRowlevel( BaseMessages.getString( PKG, \"SynchronizeAfterMerge.InsertRow\", Arrays.toString( row ) ) );\n        }\n\n        // The values to insert are those in the update section\n        //","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMerge.java#L68-L104","documentation":"Thrown in lookupValues() when the step is configured to take the target table name from a field (istablenameInField), but the value read from that field on the current row is empty/null. The step cannot build the quoted schema-table combination for its SQL without a table name.","triggerScenarios":"meta.istablenameInField() is true and data.inputRowMeta.getString(row, indexOfTableNameField) returns an empty string or null; Utils.isEmpty() then triggers KettleStepException.","commonSituations":"The table-name field in the input stream contains nulls for some rows; wrong field selected in 'The table name is defined in a field' option; upstream expression that builds the table name evaluates to empty; case sensitivity/truncation in the source column.","solutions":["Fix the upstream data so the table-name field is always populated for every row reaching the step.","Confirm the 'Name of table field' dialog option selects the correct non-empty column.","Add a Filter rows step rejecting empty table-name values before this step.","If the table is actually fixed, disable 'table name defined in a field' and type the table name directly."],"exampleFix":"// before\nSELECT target_table FROM routes; // target_table can be NULL\n// after\nSELECT COALESCE(target_table, 'default_table') AS target_table FROM routes;","handlingStrategy":"validation","validationCode":"// Pre-validate rows feeding the step\nString tableName = getFieldValue(row, \"target_table\");\nif (tableName == null || tableName.trim().isEmpty()) {\n  throw new ValidationException(\"target_table is empty for row: \" + row);\n}","typeGuard":null,"tryCatchPattern":"catch (KettleStepException e) {\n  if (e.getMessage().contains(\"name of the table is not specified\")) {\n    logError(\"Dynamic table name empty; check table-name field values.\");\n  }\n  throw e;\n}","preventionTips":["Use COALESCE/defaulting upstream so the table-name field is never null or blank.","Filter out rows with empty table names before the step.","Preview upstream data after any change to the table-name field logic."],"tags":["database","empty-value","pentaho-kettle"],"backgroundTag":"empty-required-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"}