{"record":{"id":"87aa631132c4434a","repo":"pentaho/pentaho-kettle","slug":"monetdbbulkloadermeta-getsql-noconnectiondefined","errorCode":"MonetDBBulkLoaderMeta.GetSQL.NoConnectionDefined","errorMessage":"MonetDBBulkLoaderMeta.GetSQL.NoConnectionDefined","messagePattern":"MonetDBBulkLoaderMeta\\.GetSQL\\.NoConnectionDefined","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoader.java","lineNumber":528,"sourceCode":"        }\n      }\n\n      if ( log.isRowLevel() ) {\n        logRowlevel( Const.CR );\n      }\n\n      // reset the buffer pointer...\n      //\n      data.bufferIndex = 0;\n    } catch ( Exception e ) {\n      throw new KettleException( \"An error occurred writing data to the MonetDB API (MAPI) process\", e );\n    }\n  }\n\n  protected void verifyDatabaseConnection() throws KettleException {\n    // Confirming Database Connection is defined.\n    if ( meta.getDatabaseMeta() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"MonetDBBulkLoaderMeta.GetSQL.NoConnectionDefined\" ) );\n    }\n  }\n\n  @Override\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (MonetDBBulkLoaderMeta) smi;\n    data = (MonetDBBulkLoaderData) sdi;\n\n    if ( super.init( smi, sdi ) ) {\n\n      try {\n        verifyDatabaseConnection();\n      } catch ( KettleException ex ) {\n        logError( ex.getMessage() );\n        return false;\n      }\n\n      data.quote = environmentSubstitute( meta.getFieldEnclosure() );","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoader.java#L510-L546","documentation":"Thrown by verifyDatabaseConnection() when MonetDBBulkLoaderMeta.getDatabaseMeta() returns null, meaning the step has no database connection defined. The message is a localized resource key (MonetDBBulkLoaderMeta.GetSQL.NoConnectionDefined) from the step's message bundle rather than free text.","triggerScenarios":"init() calls verifyDatabaseConnection() before the step starts; the transformation was saved without a connection assigned to the MonetDB bulk loader step, or the referenced connection metadata failed to load/resolved to null.","commonSituations":"Copying a step between transformations without its shared connection; repository metadata missing or renamed connection; exporting a transformation without including the connection definition.","solutions":["Open the transformation and assign a MonetDB database connection in the step's Database Connection field","Confirm the shared connection exists in the repository (or spoon.xml/KJB shared connections) and loads correctly","Re-save the transformation after linking the connection"],"exampleFix":"// before: running step with no connection set in transformation XML\n<connection>null</connection>\n// after: reference a defined connection\n<connection>MonetDBLocal</connection>","handlingStrategy":"validation","validationCode":"// guard before starting the transformation\nDatabaseMeta dm = monetDbBulkLoaderMeta.getDatabaseMeta();\nif ( dm == null ) { throw new IllegalArgumentException( \"Assign a MonetDB connection to the step before running\" ); }","typeGuard":"function hasConnection( MonetDBBulkLoaderMeta m ) { return m != null && m.getDatabaseMeta() != null; }","tryCatchPattern":"try { startTransformation(); } catch ( KettleException e ) { if ( \"MonetDBBulkLoaderMeta.GetSQL.NoConnectionDefined\".equals( e.getMessage() ) ) { prompt user to configure the connection; } else rethrow; }","preventionTips":["Always assign a connection in the step dialog before saving","Verify shared connections are included when exporting/copying transformations","Check the connection exists in the target repository after renames","Run transformations through a config validator in CI"],"tags":["configuration","monetdb","missing-connection"],"backgroundTag":"missing-required-config","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"}