{"record":{"id":"1a7636d94b229f6c","repo":"pentaho/pentaho-kettle","slug":"insertupdatemeta-exception-tablenotspecified","errorCode":null,"errorMessage":"InsertUpdateMeta.Exception.TableNotSpecified","messagePattern":"InsertUpdateMeta\\.Exception\\.TableNotSpecified","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java","lineNumber":815,"sourceCode":"\n  public RowMetaInterface getRequiredFields( VariableSpace space ) throws KettleException {\n    String realSchemaName = space.environmentSubstitute( schemaName );\n    String realTableName = space.environmentSubstitute( tableName );\n\n    if ( databaseMeta != null ) {\n      Database db = new Database( loggingObject, databaseMeta );\n      try {\n        db.connect();\n\n        if ( !Utils.isEmpty( realTableName ) ) {\n          // Check if this table exists...\n          if ( db.checkTableExists( realSchemaName, realTableName ) ) {\n            return db.getTableFieldsMeta( realSchemaName, realTableName );\n          } else {\n            throw new KettleException( BaseMessages.getString( PKG, \"InsertUpdateMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString( PKG, \"InsertUpdateMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException(\n          BaseMessages.getString( PKG, \"InsertUpdateMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString( PKG, \"InsertUpdateMeta.Exception.ConnectionNotDefined\" ) );\n    }\n\n  }\n\n  /**\n   * @return the schemaName\n   */\n  public String getSchemaName() {\n    return schemaName;","sourceCodeStart":797,"sourceCodeEnd":833,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java#L797-L833","documentation":"Thrown by InsertUpdateMeta.getTableFields() when the step has no table name configured, so the metadata lookup cannot inspect the target table's fields. Kettle throws it early to fail transformation validation rather than at runtime against the database. The message comes from the InsertUpdateMeta messages bundle.","triggerScenarios":"Calling getTableFields() (e.g. during 'Get Fields' in the dialog or transformation validation) when getTableName() returns null or an empty string after variable/parameter substitution.","commonSituations":"A transformation was exported/copied without the table field populated; the table name was supplied only via a variable that is undefined in the current environment; hand-edited XML or repository metadata lost the table name.","solutions":["Open the Insert Update step dialog and set the Target table (browse the schema to pick it).","If the table name uses ${VARIABLE}, confirm the variable is defined for the run (kettle.properties, parameter, or set-variable step).","Re-check the .ktr XML / repository metadata for an empty <table> element and restore it.","Verify the database connection is defined first, since the check runs only after connection validation."],"exampleFix":"// before (XML in .ktr)\n<table/>\n// after\n<table>PUBLIC.CUSTOMERS</table>","handlingStrategy":"validation","validationCode":"// Before running the transform, verify the step config\nInsertUpdateMeta meta = ...;\nif (meta.getTableName() == null || meta.getTableName().trim().isEmpty()) {\n  throw new IllegalStateException(\"Insert Update step: target table must be specified\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pick the table via the dialog's Browse button rather than typing.","Keep table-name variables defined in kettle.properties or job parameters.","Run transformation verification before execution in Spoon."],"tags":["kettle","configuration","metadata"],"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"}