{"record":{"id":"9041f89f6da292e7","repo":"pentaho/pentaho-kettle","slug":"mysqlbulkloadermeta-exception-tablenotspecified","errorCode":"MySQLBulkLoaderMeta.Exception.TableNotSpecified","errorMessage":"MySQLBulkLoaderMeta.Exception.TableNotSpecified","messagePattern":"MySQLBulkLoaderMeta\\.Exception\\.TableNotSpecified","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/mysql-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/mysqlbulkloader/MySQLBulkLoaderMeta.java","lineNumber":643,"sourceCode":"    String realTableName = space.environmentSubstitute( tableName );\n    String realSchemaName = space.environmentSubstitute( schemaName );\n\n    if ( databaseMeta != null ) {\n      Database db = new Database( loggingObject, databaseMeta );\n      try {\n        db.connect();\n\n        if ( !Utils.isEmpty( realTableName ) ) {\n          String schemaTable = databaseMeta.getQuotedSchemaTableCombination( realSchemaName, realTableName );\n\n          // Check if this table exists...\n          if ( db.checkTableExists( schemaTable ) ) {\n            return db.getTableFields( schemaTable );\n          } else {\n            throw new KettleException( BaseMessages.getString( PKG, \"MySQLBulkLoaderMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString( PKG, \"MySQLBulkLoaderMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"MySQLBulkLoaderMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString( PKG, \"MySQLBulkLoaderMeta.Exception.ConnectionNotDefined\" ) );\n    }\n\n  }\n\n  /**\n   * @return the schemaName\n   */\n  public String getSchemaName() {\n    return schemaName;\n  }","sourceCodeStart":625,"sourceCodeEnd":661,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mysql-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/mysqlbulkloader/MySQLBulkLoaderMeta.java#L625-L661","documentation":"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.","triggerScenarios":"Calling getRequiredFields when databaseMeta is defined but the step's tableName field is empty/null (Utils.isEmpty(tableName) is true).","commonSituations":"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.","solutions":["Enter a target table name in the MySQL Bulk Loader step dialog","If the table name comes from a variable/parameter, ensure it has a non-empty default or is set before validation"],"exampleFix":"// before\nmeta.setTableName( \"\" );\n// after\nmeta.setTableName( \"${TARGET_TABLE}\" ); // with TARGET_TABLE defined","handlingStrategy":"validation","validationCode":"if ( Utils.isEmpty( tableName ) ) {\n  throw new KettleException( \"MySQL Bulk Loader: table name must be set\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.getRequiredFields( transMeta );\n} catch ( KettleException e ) {\n  logError( \"Missing table config: \" + e.getMessage() );\n}","preventionTips":["Always set the target table immediately after choosing the connection","If using variables for the table name, define defaults/parameters","Validate step settings before saving the transformation"],"tags":["kettle","mysql","missing-config","step-config"],"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"}