{"record":{"id":"b1b74050a5fa7ca9","repo":"pentaho/pentaho-kettle","slug":"terafastdialog-getsql-noconnectiondefined","errorCode":"TeraFastDialog.GetSQL.NoConnectionDefined","errorMessage":"TeraFastDialog.GetSQL.NoConnectionDefined","messagePattern":"TeraFastDialog\\.GetSQL\\.NoConnectionDefined","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/terafast-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/terafastbulkloader/TeraFast.java","lineNumber":132,"sourceCode":"    // Add log error log, if set.\n    if ( StringUtils.isNotBlank( this.meta.getLogFile().getValue() ) ) {\n      try {\n        FileObject fileObject =\n          KettleVFS.getInstance( getTransMeta().getBowl() )\n            .getFileObject( environmentSubstitute( this.meta.getLogFile().getValue() ) );\n        builder.append( \" -e \" );\n        builder.append( \"\\\"\" + KettleVFS.getFilename( fileObject ) + \"\\\"\" );\n      } catch ( Exception e ) {\n        throw new KettleException( \"Error retrieving logfile string\", e );\n      }\n    }\n    return builder.toString();\n  }\n\n  protected void verifyDatabaseConnection() throws KettleException {\n    // Confirming Database Connection is defined.\n    if ( this.meta.getDbMeta() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"TeraFastDialog.GetSQL.NoConnectionDefined\" ) );\n    }\n  }\n\n  /**\n   * {@inheritDoc}\n   *\n   * @see org.pentaho.di.trans.step.BaseStep#init(org.pentaho.di.trans.step.StepMetaInterface,\n   *      org.pentaho.di.trans.step.StepDataInterface)\n   */\n  @Override\n  public boolean init( final StepMetaInterface smi, final StepDataInterface sdi ) {\n    this.meta = (TeraFastMeta) smi;\n    simpleDateFormat = new SimpleDateFormat( FastloadControlBuilder.DEFAULT_DATE_FORMAT );\n    if ( super.init( smi, sdi ) ) {\n      try {\n        verifyDatabaseConnection();\n      } catch ( KettleException ex ) {\n        logError( ex.getMessage() );","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/terafast-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/terafastbulkloader/TeraFast.java#L114-L150","documentation":"verifyDatabaseConnection ensures a database connection (DatabaseMeta) is defined on the Terafast Bulk Loader step before init proceeds. If meta.getDbMeta() is null, it throws a KettleException whose message is the localized string 'TeraFastDialog.GetSQL.NoConnectionDefined' — i.e. no Teradata connection was selected, so fastload cannot be driven.","triggerScenarios":"The step's database connection field is unset (getDbMeta() == null) when verifyDatabaseConnection is called from init() during step initialization.","commonSituations":"A developer built the transformation programmatically or via metadata injection and forgot to set the database meta; a connection was deleted/renamed so the step lost its reference; a ktr was copied between environments where the connection no longer exists.","solutions":["Open the Terafast Bulk Loader step dialog and select/create a Teradata database connection.","If the transformation was copied between environments, recreate the shared connection or fix the connection reference in the ktr.","When building the step in code, set the connection explicitly, e.g. stepMeta.setDatabaseMeta(databaseMeta) / dialog field for the connection.","Verify in the saved ktr XML that the 'connection' attribute names an existing database connection."],"exampleFix":"// before (programmatic setup)\nTeraFastMeta meta = new TeraFastMeta();\nmeta.setTableName(\"TARGET_TBL\"); // no db connection set\n// after\nTeraFastMeta meta = new TeraFastMeta();\nmeta.setDatabaseMeta(new DatabaseMeta(\"TeradataConn\", \"Teradata\", \"Native\", host, db, port, user, pass));\nmeta.setTableName(\"TARGET_TBL\");","handlingStrategy":"validation","validationCode":"if (meta.getDbMeta() == null) {\n  throw new IllegalStateException(\"Terafast Bulk Loader requires a Teradata database connection before init\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"NoConnectionDefined\")) {\n    logError(\"Assign a Teradata database connection to the Terafast Bulk Loader step\");\n  } else {\n    throw e;\n  }\n}","preventionTips":["Always select (or create) the Teradata connection in the step dialog before saving the transformation.","When copying transformations between environments, verify the referenced shared connection exists in the target repository.","When building steps programmatically or via metadata injection, set the DatabaseMeta explicitly.","Review saved ktr XML to confirm the connection attribute points at an existing connection definition."],"tags":["teradata","database-connection","configuration","kettle"],"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"}