{"record":{"id":"93d752712ad47905","repo":"pentaho/pentaho-kettle","slug":"yamlinputmeta-exception-errorsavingtorepository","errorCode":null,"errorMessage":"YamlInputMeta.Exception.ErrorSavingToRepository","messagePattern":"YamlInputMeta\\.Exception\\.ErrorSavingToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/yaml-input/impl/src/main/java/org/pentaho/di/trans/steps/yamlinput/YamlInputMeta.java","lineNumber":702,"sourceCode":"        YamlInputField field = inputFields[i];\n\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", field.getName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_path\", field.getPath() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_type\", field.getTypeDesc() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_format\", field.getFormat() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_currency\", field.getCurrencySymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_decimal\", field.getDecimalSymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_group\", field.getGroupSymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_length\", field.getLength() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_precision\", field.getPrecision() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_trim_type\", field.getTrimTypeCode() );\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"IsInFields\", inFields );\n      rep.saveStepAttribute( id_transformation, id_step, \"IsAFile\", IsAFile );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"YamlField\", yamlField );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"YamlInputMeta.Exception.ErrorSavingToRepository\", \"\" + id_step ), e );\n    }\n  }\n\n  public FileInputList getFiles( Bowl bowl, VariableSpace space ) {\n    return FileInputList.createFileList( bowl, space, fileName, fileMask, fileRequired, includeSubFolderBoolean() );\n  }\n\n  private boolean[] includeSubFolderBoolean() {\n    int len = fileName.length;\n    boolean[] includeSubFolderBoolean = new boolean[len];\n    for ( int i = 0; i < len; i++ ) {\n      includeSubFolderBoolean[i] = YES.equalsIgnoreCase( includeSubFolders[i] );\n    }\n    return includeSubFolderBoolean;\n  }\n\n  @Override","sourceCodeStart":684,"sourceCodeEnd":720,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/yaml-input/impl/src/main/java/org/pentaho/di/trans/steps/yamlinput/YamlInputMeta.java#L684-L720","documentation":"YamlInputMeta.saveRep wraps persistence of the step's attributes to the Kettle repository; any exception is rethrown as a KettleException with this message including the step's ObjectId. It indicates the step configuration could not be saved.","triggerScenarios":"saveRep on this meta class: rep.saveStepAttribute(...) for any attribute (including IsInFields, IsAFile, YamlField) throws — repository write failure inside the try/catch that rethrows with this key.","commonSituations":"Repository database read-only or out of space, transaction rolled back due to constraint violation, network interruption while saving a transformation, saving to a repository after schema downgrade.","solutions":["Inspect the attached cause for the underlying SQL error (permissions, space, constraint).","Verify the repository user has INSERT/UPDATE rights on the step attribute tables.","Check DB disk space and connectivity, then retry the save.","As a workaround, save the transformation as a .ktr file locally and re-import to the repository later."],"exampleFix":"// before: save fails with read-only DB user\n// grant write access:\nGRANT INSERT, UPDATE, DELETE ON r_step_attribute TO pdi_user;","handlingStrategy":"try-catch","validationCode":"// check write access up front\nif (!repository.isConnected()) { repository.connect(user, pass); }\n// ensure repository user has write rights on step attribute tables before saving","typeGuard":null,"tryCatchPattern":"try { meta.saveRep(repository, metaStore, transObjectId, stepObjectId); }\ncatch (KettleException e) {\n  log.error(\"Save of YAML Input step failed (id_step=\" + stepObjectId + \")\", e);\n  // fallback: export the transformation to a .ktr file so work is not lost\n  transMeta.exportToFile(new File(\"backup.ktr\"));\n}","preventionTips":["Grant the PDI repository user INSERT/UPDATE/DELETE on repository tables.","Monitor DB disk space and read-only states.","Save locally as .ktr as a checkpoint before repository commits."],"tags":["repository","database-write","metadata-save"],"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"}