{"record":{"id":"ae46ff637a282ee9","repo":"pentaho/pentaho-kettle","slug":"mysqlbulkloadermeta-exception-tablenotfound","errorCode":"MySQLBulkLoaderMeta.Exception.TableNotFound","errorMessage":"MySQLBulkLoaderMeta.Exception.TableNotFound","messagePattern":"MySQLBulkLoaderMeta\\.Exception\\.TableNotFound","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":640,"sourceCode":"  }\n\n  public RowMetaInterface getRequiredFields( VariableSpace space ) throws KettleException {\n    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   */","sourceCodeStart":622,"sourceCodeEnd":658,"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#L622-L658","documentation":"getRequiredFields connects to the configured MySQL database and checks that the target table exists using db.checkTableExists(schemaTable). If the table is absent it throws a KettleException with the localized message 'MySQLBulkLoaderMeta.Exception.TableNotFound'. This happens during metadata/SQL validation, before any data is loaded.","triggerScenarios":"Calling getRequiredFields when databaseMeta, schemaName and tableName are set but the fully-quoted schema.table combination does not exist in the database (checkTableExists returns false).","commonSituations":"Typo in table name; running against the wrong database/schema (dev vs prod); migration script not applied; case-sensitivity mismatch on Linux MySQL where table names are case-sensitive.","solutions":["Create the missing table in the target schema (or run SQL inside the step dialog to generate it)","Correct the table/schema name in the step's Table and Target schema fields","Verify the connection points to the intended database; check case sensitivity (lower_case_table_names) on Linux MySQL"],"exampleFix":"// before\nmeta.setTableName( \"SalesFact\" ); // table is actually sales_fact\n// after\nmeta.setTableName( \"sales_fact\" );","handlingStrategy":"validation","validationCode":"Database db = new Database( loggingObject, databaseMeta );\ndb.connect();\nboolean ok = db.checkTableExists( schemaTable );\ndb.disconnect();\nif ( !ok ) throw new KettleException( \"Target table missing: \" + schemaTable );","typeGuard":null,"tryCatchPattern":"try {\n  meta.getRequiredFields( transMeta );\n} catch ( KettleException e ) {\n  logError( \"Table lookup failed: \" + e.getMessage() );\n}","preventionTips":["Apply DDL/migrations to the target schema before running transformations","Use identical table names across environments or document per-env differences","Watch out for case-sensitive table names on Linux MySQL"],"tags":["kettle","mysql","database","table-not-found"],"backgroundTag":"entity-not-found","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"}