{"record":{"id":"4671cc23dcde710e","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-4671cc","errorCode":null,"errorMessage":"Unable to save step information to the repository for id_step=","messagePattern":"Unable to save step information to the repository for id_step=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/datagrid/DataGridMeta.java","lineNumber":505,"sourceCode":"          rep.saveStepAttribute( idTransformation, idStep, i, \"field_length\", fieldLength[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"field_precision\", fieldPrecision[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"set_empty_string\", setEmptyString[i] );\n          rep.saveStepAttribute( idTransformation, idStep, i, FIELD_NULL_IF, fieldNullIf[i] );\n        }\n      }\n\n      rep.saveStepAttribute( idTransformation, idStep, \"nr_lines\", dataLines.size() );\n\n      for ( int i = 0; i < dataLines.size(); i++ ) {\n        List<String> line = dataLines.get( i );\n        for ( int f = 0; f < line.size(); f++ ) {\n          String item = line.get( f );\n          rep.saveStepAttribute( idTransformation, idStep, i, \"item_\" + f, item );\n        }\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to save step information to the repository for id_step=\" + idStep, e );\n    }\n  }\n\n  @Override\n  public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,\n    TransMeta transMeta, Trans trans ) {\n    return new DataGrid( stepMeta, stepDataInterface, cnr, transMeta, trans );\n  }\n\n  @Override\n  public StepDataInterface getStepData() {\n    return new DataGridData();\n  }\n\n  @Override\n  public StepMetaInjectionInterface getStepMetaInjectionInterface() {\n    return new DataGridMetaInjection( this );\n  }","sourceCodeStart":487,"sourceCodeEnd":523,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/datagrid/DataGridMeta.java#L487-L523","documentation":"DataGridMeta.saveRep persists the step's fields and data lines as repository step attributes. Any repository write exception is wrapped in this KettleException including the id_step, so the transformation cannot be saved.","triggerScenarios":"saveRep is called when saving a transformation to a repository and rep.saveStepAttribute / insertStepDatabase fails — e.g. lost DB connection, transaction rollback, constraint violation, or read-only repository.","commonSituations":"Repository database outage or timeout during save; repository disk full or read-only; version mismatch causing unknown attributes to be rejected; stale DB session after long edit.","solutions":["Check the chained cause for the underlying repository/database error (connectivity, permissions, disk).","Retry the save after confirming repository database availability; restart Spoon to refresh the DB connection if the session is stale.","Verify the repository user has INSERT/UPDATE rights on r_step_attribute and related tables.","If a specific attribute fails, re-create the Data Grid step to regenerate its data before saving."],"exampleFix":"// no code change; ensure repository is writable before save\n// e.g. reconnect: Repository -> Reconnect, then File -> Save","handlingStrategy":"retry","validationCode":"if (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");\n// also verify write access on r_step_attribute before bulk saves","typeGuard":"boolean canSave(Repository rep){ return rep != null && rep.isConnected() && rep.hasPermission(\"write\"); }","tryCatchPattern":"try { meta.saveRep(rep, metaStore, idTransformation, idStep); }\ncatch (KettleException e) {\n  logError(\"Repository save failed: \" + e.getCause(), e);\n  // reconnect and retry once\n  rep.disconnect(); rep.connect(username, password);\n  meta.saveRep(rep, metaStore, idTransformation, idStep);\n}","preventionTips":["Ensure repository DB is writable and has free space.","Reconnect the repository session after long edits.","Confirm the repository user has INSERT/UPDATE rights.","Save referenced connections before saving steps."],"tags":["kettle","repository","write-failure"],"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"}