pentaho/pentaho-kettle · error · KettleDependencyException
This partition schema is still in use by one or more…
Error message
This partition schema is still in use by one or more transformations ({0}) : What it means
delPartitionSchema throws KettleDependencyException when the partition schema is still referenced by one or more transformations. Deleting it would break those transformations, so the repository refuses and lists the dependent transformation names in the message.
Solutions
- Re-point or update the listed transformations to another partition schema, then delete
- Delete/retire the dependent transformations first if they are obsolete
- If deletion is truly intended, remove the dependency rows via the repository API deliberately
- Catch KettleDependencyException and report the dependent transformation list to the user
Example fix
// before
delegate.delPartitionSchema(schemaId);
// after
try {
delegate.delPartitionSchema(schemaId);
} catch (KettleDependencyException e) {
log.warn("Schema in use: " + e.getMessage() + " — update dependents first");
// re-point transformations, then retry deletion
} Defensive patterns
Strategy: try-catch
Validate before calling
// before deleting, check dependencies via repository lookups of transformation->partition schema mappings
Try / catch
try { delegate.delPartitionSchema(id); } catch (KettleDependencyException e) { log.warn("Dependent transformations: " + e.getMessage()); /* re-point or delete dependents first */ } Prevention
- Parse the exception message to enumerate dependent transformations for the user
- Re-point transformations to another schema before deleting
- Run dependency checks in cleanup scripts before issuing deletes
- Treat shared partition schemas as immutable in multi-team repositories
When it happens
Trigger: Calling delPartitionSchema(id) while rows exist in the transformation partition schema mapping table referencing that ID (transList.length > 0).
Common situations: Cleanup scripts deleting shared partitioning configs still used by production transformations; deleting a schema from a repo shared by multiple teams; stale transformations that were never re-pointed after a refactor.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- This database is still in use by N jobs and M…
- DELETE_DATABASE : repository is read-only
- DELETE_TRANSFORMATION : repository is read-only
- Failed to create object in repository. Object
- Failed to save object to repository. Object [name] already…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/6f309353715e261a.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryPartitionSchemaDelegate.java:228
repository.connectionDelegate.performDelete( "DELETE FROM "
+ quoteTable( KettleDatabaseRepository.TABLE_R_PARTITION ) + " WHERE "
+ quote( KettleDatabaseRepository.FIELD_PARTITION_ID_PARTITION_SCHEMA ) + " = ? ", id_partition_schema );
repository.connectionDelegate.performDelete(
"DELETE FROM "
+ quoteTable( KettleDatabaseRepository.TABLE_R_PARTITION_SCHEMA ) + " WHERE "
+ quote( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA ) + " = ? ",
id_partition_schema );
} else {
StringBuilder message = new StringBuilder( 100 );
message.append( "The partition schema is used by the following transformations:" ).append( Const.CR );
for ( int i = 0; i < transList.length; i++ ) {
message.append( " " ).append( transList[i] ).append( Const.CR );
}
message.append( Const.CR );
KettleDependencyException e = new KettleDependencyException( message.toString() );
throw new KettleDependencyException(
"This partition schema is still in use by one or more transformations (" + transList.length + ") :", e );
}
}
}
View on GitHub (pinned to f3058517a1)