{"record":{"id":"96005eacfb26b675","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-96005e","errorCode":null,"errorMessage":"Unable to save step information to the repository for id_step=\" + id_step","messagePattern":"Unable to save step information to the repository for id_step=\" \\+ id_step","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/sqlfileoutput/SQLFileOutputMeta.java","lineNumber":572,"sourceCode":"\n      rep.saveStepAttribute( id_transformation, id_step, \"file_name\", fileName );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_extention\", extension );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_append\", fileAppended );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_split\", splitEvery );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_add_stepnr\", stepNrInFilename );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_add_partnr\", partNrInFilename );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_add_date\", dateInFilename );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_add_time\", timeInFilename );\n      rep.saveStepAttribute( id_transformation, id_step, \"create_parent_folder\", createparentfolder );\n      rep.saveStepAttribute( id_transformation, id_step, \"DoNotOpenNewFileInit\", DoNotOpenNewFileInit );\n\n      // Also, save the step-database relationship!\n      if ( databaseMeta != null ) {\n        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to save step information to the repository for id_step=\" + id_step, e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    if ( databaseMeta != null ) {\n      CheckResult cr =\n        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(\n          PKG, \"SQLFileOutputMeta.CheckResult.ConnectionExists\" ), stepMeta );\n      remarks.add( cr );\n\n      Database db = new Database( loggingObject, databaseMeta );\n      try {\n        db.connect();\n\n        cr =\n          new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/sqlfileoutput/SQLFileOutputMeta.java#L554-L590","documentation":"SQLFileOutputMeta.saveRep() persists the step's configuration to the Pentaho Repository (saveStepAttribute, saveDatabaseMetaStepAttribute, insertStepDatabase) and wraps any failure in KettleException 'Unable to save step information to the repository for id_step=<id>'. The failure means the step's settings were NOT saved even though the user clicked save.","triggerScenarios":"Saving a transformation to a repository while the repository database connection is broken, the r_step_attribute table is read-only or lacks permissions, a foreign-key constraint fails (e.g. the referenced database connection row is gone), or the transaction is rolled back.","commonSituations":"Repository DB credentials/password rotated mid-session; read-only replica used as the repository; disk full on the repository database; deleting a shared DB connection that the step still references (FK failure on id_connection).","solutions":["Read the chained cause to find the failing repository write (attribute insert vs insertStepDatabase)","Restore repository database connectivity/permissions, then re-save the transformation from Spoon","Recreate the missing shared database connection before saving the step","Use 'Export to XML' as a workaround to preserve the step settings until the repository is fixed"],"exampleFix":"// before: saving while referenced connection row was deleted (FK error)\nDELETE FROM r_database WHERE name='PROD_DB';\n// after: keep the connection, or re-link the step to an existing one first\n-- do not delete; instead update the step to use an existing connection","handlingStrategy":"try-catch","validationCode":"// Ensure repository is writable and referenced connections exist before save:\nrep.getConnection().setReadOnly( false );\nObjectId connId = rep.getDatabaseID( meta.getDatabaseMeta() );\nif ( connId == null ) throw new IllegalStateException( \"Referenced DB connection missing in repository\" );","typeGuard":null,"tryCatchPattern":"try {\n  repository.save( transMeta, versionComment, null, monitor );\n} catch ( KettleException e ) {\n  if ( e.getMessage().startsWith( \"Unable to save step information\" ) ) {\n    log.error( \"Save failed for id_step: {}\", e.getCause() );\n    // export to XML so work is not lost, fix repo, re-save\n  }\n}","preventionTips":["Verify repository write permissions before editing sessions","Don't delete shared DB connections still used by steps","Monitor repository DB disk space","Export transformations to XML as a save fallback"],"tags":["kettle","pentaho","repository","persistence","database"],"backgroundTag":"database-write-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"}