{"record":{"id":"9cd0dbf2dc63fe13","repo":"pentaho/pentaho-kettle","slug":"gploadmeta-getsql-noconnectiondefined","errorCode":null,"errorMessage":"GPLoadMeta.GetSQL.NoConnectionDefined","messagePattern":"GPLoadMeta\\.GetSQL\\.NoConnectionDefined","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":644,"sourceCode":"        output.writeLine( getInputRowMeta(), r );\n      }\n      putRow( getInputRowMeta(), r );\n      incrementLinesOutput();\n\n    } catch ( KettleException e ) {\n      logError( BaseMessages.getString( PKG, \"GPLoad.Log.ErrorInStep\" ) + e.getMessage() );\n      setErrors( 1 );\n      stopAll();\n      setOutputDone(); // signal end to receiver(s)\n      return false;\n    }\n\n    return true;\n  }\n\n  protected void verifyDatabaseConnection() throws KettleException {\n    if ( meta.getDatabaseMeta() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPLoadMeta.GetSQL.NoConnectionDefined\" ) );\n    }\n  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (GPLoadMeta) smi;\n    data = (GPLoadData) sdi;\n\n    Trans trans = getTrans();\n    preview = trans.isPreview();\n\n    if ( super.init( smi, sdi ) ) {\n\n      try {\n        verifyDatabaseConnection();\n      } catch ( KettleException ex ) {\n        logError( ex.getMessage() );\n        return false;\n      }","sourceCodeStart":626,"sourceCodeEnd":662,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L626-L662","documentation":"verifyDatabaseConnection(), called from init(), throws a KettleException with key GPLoadMeta.GetSQL.NoConnectionDefined when the step's database meta is null, i.e., no database connection is selected for the target Greenplum/Postgres database.","triggerScenarios":"init() runs with meta.getDatabaseMeta() == null - the GPLoad step was saved without choosing a connection, or the referenced connection was deleted from the transformation/repository metadata.","commonSituations":"A partially configured GPLoad step; a shared database connection removed from the environment or repository; a ktr XML referencing a connection that no longer exists; copying steps between transformations without the shared connection.","solutions":["Open the GPLoad step and select a valid database connection in the General tab.","Recreate or re-import the missing shared database connection in the transformation metadata or repository.","Edit the ktr XML to point the connection at an existing connection name.","Validate the transformation before scheduling so init() failures surface before runtime."],"exampleFix":"// before (ktr xml)\n<connection></connection>\n// after\n<connection>GreenplumDW</connection>","handlingStrategy":"validation","validationCode":"if (meta.getDatabaseMeta() == null) {\n  throw new IllegalStateException(\"GPLoad step has no database connection selected\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  init(smi, sdi);\n} catch (KettleException ke) {\n  if (ke.getMessage().contains(\"NoConnectionDefined\")) {\n    logError(\"Select a database connection in the GPLoad step\", ke);\n  }\n  throw ke;\n}","preventionTips":["Always select a database connection when configuring the GPLoad step","Verify shared connections exist when copying steps between transformations","Run transformation validation before scheduling"],"tags":["pdi","kettle","gpload","missing-connection","configuration"],"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"}