{"record":{"id":"1911a02efd4671d8","repo":"pentaho/pentaho-kettle","slug":"terafastmeta-exception-tablenotfound","errorCode":"TeraFastMeta.Exception.TableNotFound","errorMessage":"TeraFastMeta.Exception.TableNotFound","messagePattern":"TeraFastMeta\\.Exception\\.TableNotFound","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/terafast-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/terafastbulkloader/TeraFastMeta.java","lineNumber":312,"sourceCode":"\n  /**\n   * {@inheritDoc}\n   *\n   * @see org.pentaho.di.trans.step.BaseStepMeta#getRequiredFields(org.pentaho.di.core.variables.VariableSpace)\n   */\n  @Override\n  public RowMetaInterface getRequiredFields( final VariableSpace space ) throws KettleException {\n    if ( Boolean.FALSE.equals ( this.useControlFile.getValue() ) ){\n      final Database database = connectToDatabase();\n      database.shareVariablesWith( space );\n\n      RowMetaInterface fields =\n        database.getTableFieldsMeta(\n          StringUtils.EMPTY,\n          space.environmentSubstitute( this.targetTable.getValue() ) );\n      database.disconnect();\n      if ( fields == null ) {\n        throw new KettleException( MESSAGES.getString( \"TeraFastMeta.Exception.TableNotFound\" ) );\n      }\n      return fields;\n    }\n    return null;\n  }\n\n  /**\n   * @return the fastloadPath\n   */\n  public StringPluginProperty getFastloadPath() {\n    return this.fastloadPath;\n  }\n\n  /**\n   * @param fastloadPath\n   *          the fastloadPath to set\n   */\n  public void setFastloadPath( final StringPluginProperty fastloadPath ) {","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/terafast-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/terafastbulkloader/TeraFastMeta.java#L294-L330","documentation":"TeraFastMeta.getRequiredFields() queries the target table's metadata via database.getTableFieldsMeta(); when the returned RowMetaInterface is null the target table does not exist (or is not visible) in the connected Teradata database, so this localized KettleException is thrown.","triggerScenarios":"getRequiredFields() (called during tableFields/preview validation) runs getTableFieldsMeta(EMPTY, environmentSubstitute(targetTable)) and gets null because no matching table exists for the substituted name.","commonSituations":"Typo in target table name; table lives in a schema not covered by the connection's default database; environment variable in table name fails to resolve; connected to the wrong environment (dev vs prod); insufficient permissions to see the table.","solutions":["Verify the target table exists: run 'HELP TABLE <name>' or equivalent in the connected database","Check the connection's default schema/database and fully qualify the table name if needed","Ensure any variables in the target table name are defined and resolve correctly","Confirm the connection user has SELECT/SHOW privileges on the table"],"exampleFix":"// before\nRowMetaInterface fields = database.getTableFieldsMeta( StringUtils.EMPTY, space.environmentSubstitute( targetTable.getValue() ) );\n// after\nString table = space.environmentSubstitute( targetTable.getValue() );\nif ( table == null || table.trim().isEmpty() ) {\n  throw new KettleException( \"Target table name is empty after variable substitution\" );\n}\nRowMetaInterface fields = database.getTableFieldsMeta( StringUtils.EMPTY, table );","handlingStrategy":"validation","validationCode":"Database db = new Database( loggingObject, teraFastMeta.getDbMeta() );\ndb.connect();\nRowMetaInterface fields = db.getTableFieldsMeta( \"\", environmentSubstitute( targetTable ) );\ndb.disconnect();\nif ( fields == null ) throw new KettleException( \"Target table \" + targetTable + \" does not exist\" );","typeGuard":null,"tryCatchPattern":"try {\n  meta.getRequiredFields( transMeta );\n} catch ( KettleException e ) {\n  if ( e.getMessage().endsWith( \"TableNotFound\" ) || e.getMessage().contains( \"TableNotFound\" ) ) {\n    // verify table name / connection schema before proceeding\n  } else { throw e; }\n}","preventionTips":["Fully qualify the target table name (database.schema.table) when not using the default database","Verify all variables used in the table name are defined in the runtime environment","Confirm the connection points to the intended environment before running","Grant the connection user metadata/SHOW privileges on the target table"],"tags":["teradata","table-not-found","kettle","schema","metadata"],"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"}