{"record":{"id":"b77a6d0981d5f783","repo":"pentaho/pentaho-kettle","slug":"gploadmeta-exception-tablenotspecified","errorCode":"GPLoadMeta.Exception.TableNotSpecified","errorMessage":"GPLoadMeta.Exception.TableNotSpecified","messagePattern":"GPLoadMeta\\.Exception\\.TableNotSpecified","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoadMeta.java","lineNumber":786,"sourceCode":"    String realTableName = space.environmentSubstitute( tableName );\n    String realSchemaName = space.environmentSubstitute( schemaName );\n\n    if ( databaseMeta != null ) {\n      Database db = new Database( loggingObject, databaseMeta );\n      try {\n        db.connect();\n\n        if ( !Utils.isEmpty( realTableName ) ) {\n          String schemaTable = databaseMeta.getQuotedSchemaTableCombination( realSchemaName, realTableName );\n\n          // Check if this table exists...\n          if ( db.checkTableExists( schemaTable ) ) {\n            return db.getTableFields( schemaTable );\n          } else {\n            throw new KettleException( BaseMessages.getString( PKG, \"GPLoadMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString( PKG, \"GPLoadMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"GPLoadMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPLoadMeta.Exception.ConnectionNotDefined\" ) );\n    }\n  }\n\n  /**\n   * @return the schemaName\n   */\n  public String getSchemaName() {\n    return schemaName;\n  }\n","sourceCodeStart":768,"sourceCodeEnd":804,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoadMeta.java#L768-L804","documentation":"In GPLoadMeta's table-fields lookup, if the real (variable-resolved) table name is empty the code skips the existence check entirely and throws a KettleException with the TableNotSpecified message key. The library refuses to proceed without a concrete target table name.","triggerScenarios":"Calling getTableFields() when tableName (after variable substitution) is null or empty — the Table field in the GPLoad step dialog is blank or a ${TABLE_VAR} resolves to an empty string.","commonSituations":"Forgetting to fill the Table name; a table-name variable not defined in the runtime environment; importing a transformation where the field was lost; dynamically-set variable evaluated in a scope where it is unset.","solutions":["Enter the target table name in the GPLoad step's Table field","Define/initialize the ${TABLE} variable (e.g. via a Set Variables step or kettle.properties) so it resolves to a non-empty value","Re-open and re-save the step metadata to confirm the table field persisted"],"exampleFix":"// before (kettle.properties missing the variable)\n# TABLE_NAME not set -> resolves to \"\"\n// after\nTABLE_NAME=sales_fact","handlingStrategy":"validation","validationCode":"// Before execution, resolve and check the table name\nString realTable = transMeta.environmentSubstitute(meta.getTableName());\nif (realTable == null || realTable.trim().isEmpty()) {\n  throw new IllegalStateException(\"GPLoad table name is empty (check variables)\");\n}","typeGuard":null,"tryCatchPattern":"try { meta.getTableFields(); } catch (KettleException e) { if (e.getMessage().contains(\"TableNotSpecified\")) { promptForTableName(); } else { throw e; } }","preventionTips":["Always fill the Table field in the GPLoad dialog","Define table-name variables in kettle.properties or a Set Variables step upstream","Never leave ${VAR} placeholders unresolved in production configs"],"tags":["pdi","gpload","greenplum","missing-config"],"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"}