{"record":{"id":"691d5ee83c0cc2a0","repo":"pentaho/pentaho-kettle","slug":"yamlinputmeta-exception-errorreadingrepository","errorCode":null,"errorMessage":"YamlInputMeta.Exception.ErrorReadingRepository","messagePattern":"YamlInputMeta\\.Exception\\.ErrorReadingRepository","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":655,"sourceCode":"        field.setPath( rep.getStepAttributeString( id_step, i, \"field_path\" ) );\n        field.setType( ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, \"field_type\" ) ) );\n        field.setFormat( rep.getStepAttributeString( id_step, i, \"field_format\" ) );\n        field.setCurrencySymbol( rep.getStepAttributeString( id_step, i, \"field_currency\" ) );\n        field.setDecimalSymbol( rep.getStepAttributeString( id_step, i, \"field_decimal\" ) );\n        field.setGroupSymbol( rep.getStepAttributeString( id_step, i, \"field_group\" ) );\n        field.setLength( (int) rep.getStepAttributeInteger( id_step, i, \"field_length\" ) );\n        field.setPrecision( (int) rep.getStepAttributeInteger( id_step, i, \"field_precision\" ) );\n        field.setTrimType( YamlInputField.getTrimTypeByCode( rep.getStepAttributeString(\n          id_step, i, \"field_trim_type\" ) ) );\n\n        inputFields[i] = field;\n      }\n      inFields = rep.getStepAttributeBoolean( id_step, \"IsInFields\" );\n      IsAFile = rep.getStepAttributeBoolean( id_step, \"IsAFile\" );\n\n      yamlField = rep.getStepAttributeString( id_step, \"YamlField\" );\n    } catch ( Exception e ) {\n      throw new KettleException(\n        BaseMessages.getString( PKG, \"YamlInputMeta.Exception.ErrorReadingRepository\" ), e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"include\", includeFilename );\n      rep.saveStepAttribute( id_transformation, id_step, \"include_field\", filenameField );\n      rep.saveStepAttribute( id_transformation, id_step, \"addresultfile\", addResultFile );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"validating\", validating );\n      rep.saveStepAttribute( id_transformation, id_step, \"IsIgnoreEmptyFile\", IsIgnoreEmptyFile );\n      rep.saveStepAttribute( id_transformation, id_step, \"doNotFailIfNoFile\", doNotFailIfNoFile );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"rownum\", includeRowNumber );\n      rep.saveStepAttribute( id_transformation, id_step, \"rownum_field\", rowNumberField );\n      rep.saveStepAttribute( id_transformation, id_step, \"limit\", rowLimit );","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/yaml-input/impl/src/main/java/org/pentaho/di/trans/steps/yamlinput/YamlInputMeta.java#L637-L673","documentation":"YamlInputMeta.readData (repository variant) wraps loading of the step's attributes from the Kettle repository; any failure is rethrown as a KettleException with this message and the original cause attached. It signals the step settings could not be read from the repository database.","triggerScenarios":"readData from repository (invoked during loadRep of the step metadata): rep.getStepAttributeBoolean/String throws or the surrounding logic fails — typically a repository connectivity/schema problem — inside the try block that ends at this catch.","commonSituations":"Repository database down or connection dropped mid-load, repository schema version mismatch after a PDI upgrade (missing r_step_attribute rows/columns), corrupted step row in the repository.","solutions":["Check the attached cause: verify repository database connectivity and credentials.","Confirm the repository schema matches the PDI version (run the repository upgrade scripts after upgrades).","Re-open the transformation in Spoon and, if the step metadata is corrupt, recreate the step and save again.","Restore the affected step row from a repository backup."],"exampleFix":"// before: repository unreachable\nKettleException: YamlInputMeta.Exception.ErrorReadingRepository ... caused by SQLException: connection refused\n// after: fix connectivity then reload\n// verify with spoon: Tools -> Repository -> Connect, then reopen the transformation","handlingStrategy":"try-catch","validationCode":"// verify repository connectivity before loading metadata\nif (!repository.isConnected()) { repository.connect(user, pass); }\n// optionally: repository.verifyConnection();","typeGuard":null,"tryCatchPattern":"try { meta.readRep(repository, metaStore, stepId, databases); }\ncatch (KettleException e) {\n  log.error(\"Failed reading YAML Input step from repository: \" + e.getMessage(), e.getCause());\n  throw e; // escalate after ensuring cause (DB connectivity/schema) is logged\n}","preventionTips":["Run repository upgrade scripts after every PDI upgrade.","Monitor repository DB health before batch transformations.","Back up the repository before schema changes."],"tags":["repository","database","metadata-load"],"backgroundTag":"database-query-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"}