pentaho/pentaho-kettle · error · KettleException

GPLoadMeta.Exception.TableNotFound

Error message

GPLoadMeta.Exception.TableNotFound

What it means

Thrown during GPLoadMeta's table-fields lookup (getTablleFields-style public method): after connecting to the database it checks that the quoted schema.table combination exists with db.checkTableExists(); if it does not, a KettleException with the TableNotFound message key is thrown. The library requires the target GP table to pre-exist before reading its field metadata.

Solutions

  1. Create the target table in Greenplum (or run the SQL generated by the step's SQL button) before executing
  2. Verify the Table name and Schema fields in the GPLoad dialog against the database
  3. Test the database connection and confirm it points at the intended host/database
  4. Check that any ${VARIABLES} in schema/table names resolve to real values in this environment

Example fix

// before
realTableName = "sales_fct"; // table does not exist
// after
realTableName = "sales_fact"; // matches an existing table
Defensive patterns

Strategy: validation

Validate before calling

// Before running: confirm the table exists on the target connection
Database db = new Database(loggingObject, databaseMeta);
db.connect();
if (!db.checkTableExists(schema + "." + table)) {
  throw new IllegalStateException("Target table missing: " + schema + "." + table);
}
db.disconnect();

Try / catch

try { meta.getTableFields(); } catch (KettleException e) { if (e.getMessage().contains("TableNotFound")) { createTargetTable(); } else { throw e; } }

Prevention

When it happens

Trigger: Calling getTableFields() when checkTableExists(schemaTable) returns false — the schema/table name in the step config does not match an existing table on the configured connection (or the realSchemaName/realTableName variable resolution yields a wrong name).

Common situations: Typo in table name; wrong schema selected; environment variable substitution resolving differently in the target environment; table not yet created on the Greenplum database; pointing at the wrong database/host.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoadMeta.java:783

  }

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

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

View on GitHub (pinned to f3058517a1)