pentaho/pentaho-kettle · error · KettleException
GPBulkLoaderMeta.Exception.TableNotSpecified
GPBulkLoaderMeta.Exception.TableNotSpecified
Error message
GPBulkLoaderMeta.Exception.TableNotSpecified
What it means
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.
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.
Example fix
// before
meta.setTableName( null ); // validation fails
// after
meta.setTableName( "${TARGET_TABLE}" ); // ensure variable is defined
// or
meta.setTableName( "staging.sales_facts" ); Defensive patterns
Strategy: validation
Validate before calling
if ( databaseMeta != null && ( Utils.isEmpty( schemaName ) && Utils.isEmpty( tableName ) ) ) {
throw new KettleException( "Target table must be set before validation" );
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- GPBulkLoaderMeta.Exception.ConnectionNotDefined
- PurRepository.fileCannotBeSavedInRootDirectory
- Unable to find field [
- A deadlock was detected between steps
- AbsSecurityManager.ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/48f8a0c9d7febce9.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java:606
String realTableName = space.environmentSubstitute( tableName );
String realSchemaName = space.environmentSubstitute( schemaName );
if ( databaseMeta != null ) {
Database db = new Database( loggingObject, databaseMeta );
try {
db.connect();
if ( !Utils.isEmpty( realTableName ) ) {
String schemaTable = databaseMeta.getQuotedSchemaTableCombination( realSchemaName, realTableName );
// Check if this table exists...
if ( db.checkTableExists( schemaTable ) ) {
return db.getTableFields( schemaTable );
} else {
throw new KettleException( BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.TableNotFound" ) );
}
} else {
throw new KettleException( BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.TableNotSpecified" ) );
}
} catch ( Exception e ) {
throw new KettleException(
BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.ErrorGettingFields" ), e );
} finally {
db.close();
}
} else {
throw new KettleException( BaseMessages.getString( PKG, "GPBulkLoaderMeta.Exception.ConnectionNotDefined" ) );
}
}
/**
* @return the schemaName
*/
public String getSchemaName() {
return schemaName;View on GitHub (pinned to f3058517a1)