pentaho/pentaho-kettle · error · KettleException
DynamicSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo
Error message
DynamicSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo
What it means
Kettle wraps any exception thrown while loading the Dynamic SQL Row step's settings from a repository into this KettleException. It indicates the step metadata (sql, outer_join, replace_vars, sql_fieldname, query_only_on_change attributes) could not be read from the repository database; the original cause is attached.
Solutions
- Check the underlying cause exception in the stack trace for the real repository error (connectivity, permissions, missing row).
- Verify the repository database is reachable and the user can read step attribute tables.
- Reopen/re-save the transformation; if the step XML/rows are corrupt, recreate the DynamicSQLRow step.
- Align Pentaho/Kettle versions between the tool that saved the transformation and the one loading it.
Example fix
// before: loading with a stale/broken repository connection
TransMeta meta = new TransMeta(repo, "trans.ktr");
// after: validate repository connectivity and handle the load error
if (!repo.isConnected()) { repo.connect(); }
try {
TransMeta meta = new TransMeta(repo, "trans.ktr");
} catch (KettleException e) {
logError("Failed to read DynamicSQLRow step info", e);
} Defensive patterns
Strategy: try-catch
Validate before calling
// before loading
if (!repo.isConnected()) { repo.connect(); }
if (repo.getObjectId(new TransMeta()) == null) { /* repository unreadable */ } Try / catch
try { TransMeta tm = new TransMeta(repo, path); } catch (KettleException e) { log.error("Step info read failed", e.getCause()); } Prevention
- Verify repository connectivity before loading transformations
- Keep Pentaho versions consistent across save/load environments
- Back up the repository database
When it happens
Trigger: Repository.readRep path: TransMeta loads a transformation containing a DynamicSQLRow step and rep.getStepAttributeString/getStepAttributeBoolean throws (repository connection failure, missing/corrupt step row, incompatible repository schema).
Common situations: Repository DB temporarily unreachable or dropped mid-load; transformation saved by a newer Pentaho version with attributes the current repository schema cannot serve; corrupted r_step_attribute rows; permission issues reading the repository tables.
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
- AppendMeta.Exception.UnexpectedErrorReadingStepInfo
- CombinationLookupMeta.Exception.UnexpectedErrorWhileReadingS…
- error reading step with id_step= from the repository
- ExecProcessMeta.Exception.UnexpectedErrorReadingStepInfo
- ExecSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7ef5f1b4fcad97fe.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/dynamicsqlrow/DynamicSQLRowMeta.java:289
retval.append( " " + XMLHandler.addTagValue( "outer_join", outerJoin ) );
retval.append( " " + XMLHandler.addTagValue( "replace_vars", replacevars ) );
retval.append( " " + XMLHandler.addTagValue( "sql_fieldname", sqlfieldname ) );
retval.append( " " + XMLHandler.addTagValue( "query_only_on_change", queryonlyonchange ) );
return retval.toString();
}
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
try {
databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, "id_connection", databases );
rowLimit = (int) rep.getStepAttributeInteger( id_step, "rowlimit" );
sql = rep.getStepAttributeString( id_step, "sql" );
outerJoin = rep.getStepAttributeBoolean( id_step, "outer_join" );
replacevars = rep.getStepAttributeBoolean( id_step, "replace_vars" );
sqlfieldname = rep.getStepAttributeString( id_step, "sql_fieldname" );
queryonlyonchange = rep.getStepAttributeBoolean( id_step, "query_only_on_change" );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "DynamicSQLRowMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
try {
rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
rep.saveStepAttribute( id_transformation, id_step, "rowlimit", rowLimit );
rep.saveStepAttribute( id_transformation, id_step, "sql", sql );
rep.saveStepAttribute( id_transformation, id_step, "outer_join", outerJoin );
rep.saveStepAttribute( id_transformation, id_step, "replace_vars", replacevars );
rep.saveStepAttribute( id_transformation, id_step, "sql_fieldname", sqlfieldname );
rep.saveStepAttribute( id_transformation, id_step, "query_only_on_change", queryonlyonchange );
// Also, save the step-database relationship!
if ( databaseMeta != null ) {
rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
}View on GitHub (pinned to f3058517a1)