{"record":{"id":"e9cca2b22f2838a9","repo":"pentaho/pentaho-kettle","slug":"transmeta-log-unabletoreadpartitionschemafromrepository","errorCode":null,"errorMessage":"TransMeta.Log.UnableToReadPartitionSchemaFromRepository","messagePattern":"TransMeta\\.Log\\.UnableToReadPartitionSchemaFromRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java","lineNumber":1018,"sourceCode":"   */\n  public void readPartitionSchemas( TransMeta transMeta, boolean overWriteShared ) throws KettleException {\n    try {\n      ObjectId[] dbids = repository.getPartitionSchemaIDs( false );\n      for ( int i = 0; i < dbids.length; i++ ) {\n        PartitionSchema partitionSchema = repository.loadPartitionSchema( dbids[i], null ); // Load last version\n        PartitionSchema check = transMeta.findPartitionSchema( partitionSchema.getName() ); // Check if there already is\n                                                                                            // one in the transformation\n        if ( check == null || overWriteShared ) {\n          if ( !Utils.isEmpty( partitionSchema.getName() ) ) {\n            transMeta.addOrReplacePartitionSchema( partitionSchema );\n            if ( !overWriteShared ) {\n              partitionSchema.setChanged( false );\n            }\n          }\n        }\n      }\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"TransMeta.Log.UnableToReadPartitionSchemaFromRepository\" ), dbe );\n    }\n  }\n\n  /**\n   * Read the slave servers in the repository and add them to this transformation if they are not yet present.\n   *\n   * @param transMeta\n   *          The transformation to load into.\n   * @param overWriteShared\n   *          if an object with the same name exists, overwrite\n   * @throws KettleException\n   */\n  public void readSlaves( TransMeta transMeta, boolean overWriteShared ) throws KettleException {\n    try {\n      ObjectId[] dbids = repository.getSlaveIDs( false );\n      for ( int i = 0; i < dbids.length; i++ ) {\n        SlaveServer slaveServer = repository.loadSlaveServer( dbids[i], null ); // Load last version","sourceCodeStart":1000,"sourceCodeEnd":1036,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java#L1000-L1036","documentation":"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.","triggerScenarios":"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.","commonSituations":"Outdated repository schema after a Kettle upgrade, insufficient DB permissions, corrupted partition schema rows, or transient DB outage while opening a transformation.","solutions":["Inspect the cause KettleException/KettleDatabaseException for the root SQL error","Ensure R_PARTITION_SCHEMA and R_PARTITION tables exist with correct schema for your Pentaho version","Reconnect/verify the repository database connection","Fix or remove corrupt rows referencing nonexistent partitions"],"exampleFix":"// before\nTransMeta tm = rep.loadTransformation(transId, null); // may throw\n\n// after\ntry {\n  TransMeta tm = rep.loadTransformation(transId, null);\n} catch (KettleException e) {\n  logError(\"Unable to read partition schemas: \" + e.getMessage(), e);\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"// Java: probe repository access before loading\nDatabase db = new Database(loggingObject, repository.getDatabaseMeta());\ndb.connect();\nboolean hasSchema = db.checkTableExists(\"R_PARTITION_SCHEMA\");\ndb.disconnect();\nif (!hasSchema) throw new IllegalStateException(\"Repository schema incomplete\");","typeGuard":null,"tryCatchPattern":"try {\n  transMeta = rep.loadTransformation(transId, null);\n} catch (KettleException e) {\n  log.error(\"Partition schema read failed: \" + e.getCause(), e);\n  throw new RuntimeException(\"Repository partition data unreadable\", e);\n}","preventionTips":["Run repository upgrade scripts after every Kettle/Pentaho version change","Validate R_PARTITION_SCHEMA/R_PARTITION rows after manual repository edits","Use connection pooling with sane timeouts to survive transient DB outages","Monitor repository DB health before scheduled transformation loads"],"tags":["database","repository","kettle","partitioning"],"backgroundTag":"database-query-failed","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"}