{"record":{"id":"48f8a0c9d7febce9","repo":"pentaho/pentaho-kettle","slug":"gpbulkloadermeta-exception-tablenotspecified-48f8a0","errorCode":"GPBulkLoaderMeta.Exception.TableNotSpecified","errorMessage":"GPBulkLoaderMeta.Exception.TableNotSpecified","messagePattern":"GPBulkLoaderMeta\\.Exception\\.TableNotSpecified","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java","lineNumber":606,"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, \"GPBulkLoaderMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString( PKG, \"GPBulkLoaderMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException(\n          BaseMessages.getString( PKG, \"GPBulkLoaderMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPBulkLoaderMeta.Exception.ConnectionNotDefined\" ) );\n    }\n\n  }\n\n  /**\n   * @return the schemaName\n   */\n  public String getSchemaName() {\n    return schemaName;","sourceCodeStart":588,"sourceCodeEnd":624,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java#L588-L624","documentation":"getRequiredFields() requires a target table to determine the table's field metadata; if neither schemaName nor tableName is set (Utils.isEmpty), it throws a KettleException with GPBulkLoaderMeta.Exception.TableNotSpecified. It means the step was validated without the mandatory target table being configured.","triggerScenarios":"Calling getRequiredFields() on a PGBulkLoaderMeta whose realTableName (or schema+table combination) is empty — the 'Target table' field in the step dialog was never filled, or a variable used there resolves to an empty string.","commonSituations":"Freshly added bulk loader step validated before configuration; variable (e.g. ${TABLE_NAME}) undefined or empty at runtime; metadata injection that skipped the TABLE attribute.","solutions":["Set the target table in the step dialog (or ensure ${TABLE_NAME} resolves to a non-empty value).","If a variable is used, define it in the transformation/job properties or environment before validation.","If injecting metadata, inject the TABLE attribute along with the mappings."],"exampleFix":"// before\nmeta.setTableName( null ); // validation fails\n// after\nmeta.setTableName( \"${TARGET_TABLE}\" ); // ensure variable is defined\n// or\nmeta.setTableName( \"staging.sales_facts\" );","handlingStrategy":"validation","validationCode":"if ( databaseMeta != null && ( Utils.isEmpty( schemaName ) && Utils.isEmpty( tableName ) ) ) {\n  throw new KettleException( \"Target table must be set before validation\" );\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fill the Target table field before pressing SQL/Validate.","Ensure variables like ${TABLE_NAME} are defined for all environments.","Include TABLE in any metadata-injection mapping."],"tags":["kettle","missing-configuration","validation","pentaho"],"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"}