pentaho/pentaho-kettle · error · KettleException
No connection specified
Error message
No connection specified
What it means
At the end of building the psql command line, createCommandLine() appends the target database name from meta.getDatabaseMeta(). If the connection (DatabaseMeta) is null there is nothing to connect to, so the step throws this KettleException. It is the final required-field check before returning the assembled command.
Solutions
- Open the GP Bulk Loader step and select a valid database connection pointing at the Greenplum/PostgreSQL target.
- Re-create the missing shared DB connection in the transformation, then re-select it in the step.
- When building meta in code, call meta.setDatabaseMeta(databaseMeta) before execute().
- Validate the transformation before running (Check in Spoon) so the missing connection is flagged early.
Example fix
// before
GPBulkLoaderMeta meta = new GPBulkLoaderMeta();
// no connection -> throws
// after
DatabaseMeta dm = new DatabaseMeta("gp", "POSTGRESQL", "Native", "gphost", "mydb", "5432", "gpuser", "");
meta.setDatabaseMeta(dm); Defensive patterns
Strategy: validation
Validate before calling
if (meta.getDatabaseMeta() == null) {
throw new IllegalArgumentException(
"GP Bulk Loader: a database connection must be selected before execute()");
} Try / catch
try {
execute(meta, wait);
} catch (KettleException e) {
if (e.getMessage().contains("No connection specified")) {
meta.setDatabaseMeta(resolveDefaultConnection(transMeta));
execute(meta, wait);
} else throw e;
} Prevention
- Select a connection in the step dialog and run 'Check' before saving
- Use shared connections and export them with the transformation
- Assert meta.getDatabaseMeta() != null in any code that builds the step programmatically
When it happens
Trigger: execute() -> createCommandLine() runs while meta.getDatabaseMeta() returns null: no database connection was selected in the GP Bulk Loader step, or the step metadata was constructed/loaded without the connection attribute (e.g. the referenced connection was deleted from the transformation).
Common situations: User forgets to pick a connection in the step dialog; the shared connection referenced by the step was removed or renamed so it no longer deserializes; programmatic GPBulkLoaderMeta usage without setDatabaseMeta(); transformation copied between repositories where the connection was not shared/exported.
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
- MySQLBulkLoaderMeta.Exception.ConnectionNotDefined
- No connection specified
- No control file specified
- No psql application specified
- OraBulkLoaderMeta.Exception.ConnectionNotDefined
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5e783dabae2c713a.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoader.java:393
String hostname = Const.NVL( dm.getHostname(), "" );
String portnum = Const.NVL( dm.getDatabasePortNumberString(), "" );
sb.append( " -h " );
sb.append( hostname );
sb.append( " -p " );
sb.append( portnum );
// Database Name
String dns = Const.NVL( dm.getDatabaseName(), "" );
sb.append( " -d " );
String overrideName = meta.getDbNameOverride();
if ( Utils.isEmpty( Const.rtrim( overrideName ) ) ) {
sb.append( environmentSubstitute( dns ) );
} else {
// if the database name override is filled in, do that one.
sb.append( environmentSubstitute( overrideName ) );
}
} else {
throw new KettleException( "No connection specified" );
}
return sb.toString();
}
public boolean execute( GPBulkLoaderMeta meta, boolean wait ) throws KettleException {
Runtime rt = Runtime.getRuntime();
try {
psqlProcess = rt.exec( createCommandLine( meta, true ) );
// any error message?
StreamLogger errorLogger = new StreamLogger( psqlProcess.getErrorStream(), "ERROR" );
// any output?
StreamLogger outputLogger = new StreamLogger( psqlProcess.getInputStream(), "OUTPUT" );
// kick them off
errorLogger.start();View on GitHub (pinned to f3058517a1)