pentaho/pentaho-kettle · error · KettleException

MySQLBulkLoaderMeta.Exception.TableNotSpecified

MySQLBulkLoaderMeta.Exception.TableNotSpecified

Error message

MySQLBulkLoaderMeta.Exception.TableNotSpecified

What it means

In getRequiredFields, if neither a table name nor a schema-qualified table can be determined, the step immediately throws a KettleException with 'MySQLBulkLoaderMeta.Exception.TableNotSpecified'. The step cannot resolve required fields without knowing which table to inspect.

Solutions

  1. Enter a target table name in the MySQL Bulk Loader step dialog
  2. If the table name comes from a variable/parameter, ensure it has a non-empty default or is set before validation

Example fix

// before
meta.setTableName( "" );
// after
meta.setTableName( "${TARGET_TABLE}" ); // with TARGET_TABLE defined
Defensive patterns

Strategy: validation

Validate before calling

if ( Utils.isEmpty( tableName ) ) {
  throw new KettleException( "MySQL Bulk Loader: table name must be set" );
}

Try / catch

try {
  meta.getRequiredFields( transMeta );
} catch ( KettleException e ) {
  logError( "Missing table config: " + e.getMessage() );
}

Prevention

When it happens

Trigger: Calling getRequiredFields when databaseMeta is defined but the step's tableName field is empty/null (Utils.isEmpty(tableName) is true).

Common situations: Freshly added MySQL Bulk Loader step where the user entered a connection but no target table; table name supplied only via variable that resolves to empty at validation time.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/9041f89f6da292e7. Report an issue: GitHub.

Appendix: source

Thrown at plugins/mysql-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/mysqlbulkloader/MySQLBulkLoaderMeta.java:643

    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, "MySQLBulkLoaderMeta.Exception.TableNotFound" ) );
          }
        } else {
          throw new KettleException( BaseMessages.getString( PKG, "MySQLBulkLoaderMeta.Exception.TableNotSpecified" ) );
        }
      } catch ( Exception e ) {
        throw new KettleException( BaseMessages.getString( PKG, "MySQLBulkLoaderMeta.Exception.ErrorGettingFields" ), e );
      } finally {
        db.close();
      }
    } else {
      throw new KettleException( BaseMessages.getString( PKG, "MySQLBulkLoaderMeta.Exception.ConnectionNotDefined" ) );
    }

  }

  /**
   * @return the schemaName
   */
  public String getSchemaName() {
    return schemaName;
  }

View on GitHub (pinned to f3058517a1)