{"record":{"id":"70f5a1cefa9c7973","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-70f5a1","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/sort/SortRowsMeta.java","lineNumber":380,"sourceCode":"    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"directory\", directory );\n      rep.saveStepAttribute( id_transformation, id_step, \"prefix\", prefix );\n      rep.saveStepAttribute( id_transformation, id_step, \"sort_size\", sortSize );\n      rep.saveStepAttribute( id_transformation, id_step, \"free_memory\", freeMemoryLimit );\n      rep.saveStepAttribute( id_transformation, id_step, \"compress\", compressFiles );\n      rep.saveStepAttribute( id_transformation, id_step, \"compress_variable\", compressFilesVariable );\n      rep.saveStepAttribute( id_transformation, id_step, \"unique_rows\", onlyPassingUniqueRows );\n\n      for ( int i = 0; i < fieldName.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fieldName[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_ascending\", ascending[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_case_sensitive\", caseSensitive[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_collator_enabled\", collatorEnabled[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_collator_strength\", collatorStrength[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_presorted\", preSortedField[i] );\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  @Override\n  public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info,\n      StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    // Set the sorted properties: ascending/descending\n    assignSortingCriteria( inputRowMeta );\n  }\n\n  @SuppressWarnings( \"WeakerAccess\" )\n  public void assignSortingCriteria( RowMetaInterface inputRowMeta ) {\n    for ( int i = 0; i < fieldName.length; i++ ) {\n      int idx = inputRowMeta.indexOfValue( fieldName[i] );\n      if ( idx >= 0 ) {\n        ValueMetaInterface valueMeta = inputRowMeta.getValueMeta( idx );\n        // On all these valueMetas, check to see if the value actually exists before we try to\n        // set them.","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/sort/SortRowsMeta.java#L362-L398","documentation":"SortRowsMeta.saveRep() persists each sort field's attributes (name, ascending, case sensitivity, collator enabled/strength, presorted) to the repository. A failure in any saveStepAttribute call is wrapped in a KettleException 'Unable to save step information to the repository for id_step=...'.","triggerScenarios":"Saving a transformation whose Sort rows step attributes cannot be written: repository connection dropped, read-only repository user, DB constraint violations, or transaction errors.","commonSituations":"Read-only or insufficient DB permissions for the Kettle repository user; repository storage full; network interruption mid-save; repository lock contention.","solutions":["Check the repository user has write (INSERT/UPDATE) privileges on the step attribute tables.","Verify repository connectivity during save; retry after network issues.","Check DB error/log for constraint or space errors and fix the underlying DB problem.","Test saving a trivial transformation to isolate whether it is step-specific or repository-wide.","If a lock/transaction conflict, ask other users to release and retry the save."],"exampleFix":"-- before\nGRANT SELECT ON r_step_attribute TO kettle_user;\n-- after\nGRANT SELECT, INSERT, UPDATE, DELETE ON r_step_attribute TO kettle_user;","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { repo.save(transMeta, path, metaStore); } catch (KettleException e) {\n  if (e.getMessage().contains(\"Unable to save step information\")) {\n    logError(\"Repository write failed: \" + e.getCause());\n    // check permissions/connection then retry\n  }\n}","preventionTips":["Grant the repository user full DML on Kettle repository tables.","Check repository disk/quota before large saves.","Avoid concurrent saves of the same transformation.","Verify connectivity before long editing sessions."],"tags":["kettle","repository","save","permissions"],"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"}