{"record":{"id":"316323ef8d3abab7","repo":"pentaho/pentaho-kettle","slug":"monetdbbulkloadermeta-exception-tablenotfound","errorCode":"MonetDBBulkLoaderMeta.Exception.TableNotFound","errorMessage":"MonetDBBulkLoaderMeta.Exception.TableNotFound","messagePattern":"MonetDBBulkLoaderMeta\\.Exception\\.TableNotFound","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java","lineNumber":783,"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(\n                PKG, \"MonetDBBulkLoaderMeta.Exception.TableNotFound\" ) );\n          }\n        } else {\n          throw new KettleException( BaseMessages.getString(\n              PKG, \"MonetDBBulkLoaderMeta.Exception.TableNotSpecified\" ) );\n        }\n      } catch ( Exception e ) {\n        throw new KettleException( BaseMessages.getString(\n            PKG, \"MonetDBBulkLoaderMeta.Exception.ErrorGettingFields\" ), e );\n      } finally {\n        db.close();\n      }\n    } else {\n      throw new KettleException( BaseMessages.getString(\n          PKG, \"MonetDBBulkLoaderMeta.Exception.ConnectionNotDefined\" ) );\n    }\n\n  }","sourceCodeStart":765,"sourceCodeEnd":801,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java#L765-L801","documentation":"During field discovery, MonetDBBulkLoaderMeta connects to the configured database and checks whether the quoted schema.table combination exists via db.checkTableExists(); if it does not, it throws KettleException 'TableNotFound'. This is a fail-fast guard before attempting getTableFields() on a missing table.","triggerScenarios":"Calling the getTableFields/constructor path when databaseMeta is configured with a schemaName+tableName whose quoted combination does not exist in the target MonetDB database at check time.","commonSituations":"Typo in the table name; wrong schema name; table created in a different database/connection; table dropped or renamed after the transformation was designed; connecting with credentials that resolve to a different database.","solutions":["Verify the table exists: connect to MonetDB and run SELECT * FROM information_schema.tables WHERE table_name='<name>'","Check schema and table name values in the step dialog (case sensitivity and quoting matter)","Confirm the step's database connection points to the intended host/database","Create the missing table or update the step to point to the correct one"],"exampleFix":"// before\nString realTableName = environmentSubstitute(tableName);\n// after\nString realTableName = environmentSubstitute(tableName);\nif (realTableName == null || realTableName.isEmpty()) {\n  throw new KettleException(\"Table name must be set before reading fields\");\n}\n// ensure table exists via db.checkTableExists(schemaTable) before getTableFields","handlingStrategy":"validation","validationCode":"Database db = new Database(parentLoggingObject, databaseMeta);\ndb.connect();\nString schemaTable = databaseMeta.getQuotedSchemaTableCombination(\n    environmentSubstitute(schemaName), environmentSubstitute(tableName));\nif (!db.checkTableExists(schemaTable)) {\n  throw new KettleException(\"Target table \" + schemaTable + \" does not exist\");\n}\ndb.disconnect();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve all variables (${TABLE}) before running and fail fast on empty substitution","Verify schema/table names against information_schema when designing the step","Pin the step's database connection to the intended environment (avoid silent connection swaps)","Use environment-specific configuration files so dev/prod table names are managed centrally"],"tags":["database","monetdb","table-existence","configuration"],"backgroundTag":"record-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"}