{"record":{"id":"5e70709f8a71ecfe","repo":"pentaho/pentaho-kettle","slug":"insertupdatemeta-exception-unabletosavestepinfotorepository","errorCode":null,"errorMessage":"InsertUpdateMeta.Exception.UnableToSaveStepInfoToRepository","messagePattern":"InsertUpdateMeta\\.Exception\\.UnableToSaveStepInfoToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java","lineNumber":423,"sourceCode":"        rep.saveStepAttribute( id_transformation, id_step, i, \"key_name\", keyFields[ i ].getKeyStream() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"key_field\", keyFields[ i ].keyLookup );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"key_condition\", keyFields[ i ].getKeyCondition() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"key_name2\", keyFields[ i ].getKeyStream2() );\n      }\n\n      for ( int i = 0; i < updateFields.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"value_name\", updateFields[ i ].getUpdateLookup() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"value_rename\", updateFields[ i ].getUpdateStream() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"value_update\",\n          updateFields[ i ].getUpdate().booleanValue() );\n      }\n\n      // Also, save the step-database relationship!\n      if ( databaseMeta != null ) {\n        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"InsertUpdateMeta.Exception.UnableToSaveStepInfoToRepository\" )\n        + id_step, e );\n    }\n  }\n\n  @Override\n  public StepHelperInterface getStepHelperInterface() {\n    return new InsertUpdateHelper();\n  }\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,\n                         VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    // Default: nothing changes to rowMeta\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 ) {","sourceCodeStart":405,"sourceCodeEnd":441,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java#L405-L441","documentation":"saveRep failed while persisting the step's configuration to the repository; any exception (e.g., from insertStepDatabase or attribute writes) is wrapped in a KettleException with the step id appended. The transformation metadata was not saved for this step.","triggerScenarios":"Repository DB write failure: connection lost mid-save, insufficient INSERT/UPDATE privileges, constraint violation, read-only repository, or exception while inserting the step-database relationship.","commonSituations":"DB user lacks write grants on repository tables; repository database disk full or offline; concurrent saves causing lock contention; transaction rolled back.","solutions":["Test repository connection and confirm the user has INSERT/UPDATE privileges on repository tables.","Check the wrapped cause (e) for the underlying SQL error.","Retry the save after resolving DB availability (locks, disk space, downtime).","Export the transformation to a .ktr file as a workaround until repository access is restored."],"exampleFix":"// workaround until DB is fixed\ntransMeta.exportToFile(\"backup.ktr\"); // preserve metadata\n// fix repo grants then save normally","handlingStrategy":"try-catch","validationCode":"if (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");\n// ensure DB user has INSERT/UPDATE on repository tables (verify grants with DBA)","typeGuard":"null","tryCatchPattern":"try { transMeta.saveRep(rep, metaStore, transObjectId); }\ncatch (KettleException e) {\n  logError(\"Repository save failed; root cause:\", e.getCause());\n  transMeta.exportToFile(\"fallback.ktr\"); // preserve work\n  throw e;\n}","preventionTips":["Grant the repository user INSERT/UPDATE/DELETE on repository tables.","Monitor repository DB for disk space and lock contention.","Export .ktr backups before risky bulk repository operations.","Avoid concurrent saves to the same transformation."],"tags":["kettle","repository","persistence","database-write"],"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"}