pentaho/pentaho-kettle · error · KettleException

TransMeta.Log.UnableToReadPartitionSchemaFromRepository

Error message

TransMeta.Log.UnableToReadPartitionSchemaFromRepository

What it means

Thrown by readPartitionSchemas() when loading partition schemas for a transformation from the Kettle database repository fails with a KettleException. Like the cluster read, it runs during readTransSharedObjects() and wraps the low-level repository/database error. The message key names the operation so callers know which shared-object type failed to load.

Solutions

  1. Inspect the cause KettleException/KettleDatabaseException for the root SQL error
  2. Ensure R_PARTITION_SCHEMA and R_PARTITION tables exist with correct schema for your Pentaho version
  3. Reconnect/verify the repository database connection
  4. Fix or remove corrupt rows referencing nonexistent partitions

Example fix

// before
TransMeta tm = rep.loadTransformation(transId, null); // may throw

// after
try {
  TransMeta tm = rep.loadTransformation(transId, null);
} catch (KettleException e) {
  logError("Unable to read partition schemas: " + e.getMessage(), e);
  throw e;
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Java: probe repository access before loading
Database db = new Database(loggingObject, repository.getDatabaseMeta());
db.connect();
boolean hasSchema = db.checkTableExists("R_PARTITION_SCHEMA");
db.disconnect();
if (!hasSchema) throw new IllegalStateException("Repository schema incomplete");

Try / catch

try {
  transMeta = rep.loadTransformation(transId, null);
} catch (KettleException e) {
  log.error("Partition schema read failed: " + e.getCause(), e);
  throw new RuntimeException("Repository partition data unreadable", e);
}

Prevention

When it happens

Trigger: Loading a TransMeta from a KettleDatabaseRepository where the query over R_PARTITION_SCHEMA / R_PARTITION fails: missing tables, broken connection, invalid rows, or any KettleException raised by the repository layer.

Common situations: Outdated repository schema after a Kettle upgrade, insufficient DB permissions, corrupted partition schema rows, or transient DB outage while opening a transformation.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java:1018

   */
  public void readPartitionSchemas( TransMeta transMeta, boolean overWriteShared ) throws KettleException {
    try {
      ObjectId[] dbids = repository.getPartitionSchemaIDs( false );
      for ( int i = 0; i < dbids.length; i++ ) {
        PartitionSchema partitionSchema = repository.loadPartitionSchema( dbids[i], null ); // Load last version
        PartitionSchema check = transMeta.findPartitionSchema( partitionSchema.getName() ); // Check if there already is
                                                                                            // one in the transformation
        if ( check == null || overWriteShared ) {
          if ( !Utils.isEmpty( partitionSchema.getName() ) ) {
            transMeta.addOrReplacePartitionSchema( partitionSchema );
            if ( !overWriteShared ) {
              partitionSchema.setChanged( false );
            }
          }
        }
      }
    } catch ( KettleException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "TransMeta.Log.UnableToReadPartitionSchemaFromRepository" ), dbe );
    }
  }

  /**
   * Read the slave servers in the repository and add them to this transformation if they are not yet present.
   *
   * @param transMeta
   *          The transformation to load into.
   * @param overWriteShared
   *          if an object with the same name exists, overwrite
   * @throws KettleException
   */
  public void readSlaves( TransMeta transMeta, boolean overWriteShared ) throws KettleException {
    try {
      ObjectId[] dbids = repository.getSlaveIDs( false );
      for ( int i = 0; i < dbids.length; i++ ) {
        SlaveServer slaveServer = repository.loadSlaveServer( dbids[i], null ); // Load last version

View on GitHub (pinned to f3058517a1)