{"record":{"id":"89db36e3b16527d5","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-reading-step-information-from-the-89db36","errorCode":null,"errorMessage":"Unexpected error reading step information from the repository","messagePattern":"Unexpected error reading step information from the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/sqlfileoutput/SQLFileOutputMeta.java","lineNumber":539,"sourceCode":"      createTable = rep.getStepAttributeBoolean( id_step, \"create\" );\n      encoding = rep.getStepAttributeString( id_step, \"encoding\" );\n      dateformat = rep.getStepAttributeString( id_step, \"dateformat\" );\n      AddToResult = rep.getStepAttributeBoolean( id_step, \"addtoresult\" );\n      StartNewLine = rep.getStepAttributeBoolean( id_step, \"startnewline\" );\n\n      fileName = rep.getStepAttributeString( id_step, \"file_name\" );\n      extension = rep.getStepAttributeString( id_step, \"file_extention\" );\n      fileAppended = rep.getStepAttributeBoolean( id_step, \"file_append\" );\n      splitEvery = (int) rep.getStepAttributeInteger( id_step, \"file_split\" );\n      stepNrInFilename = rep.getStepAttributeBoolean( id_step, \"file_add_stepnr\" );\n      partNrInFilename = rep.getStepAttributeBoolean( id_step, \"file_add_partnr\" );\n      dateInFilename = rep.getStepAttributeBoolean( id_step, \"file_add_date\" );\n      timeInFilename = rep.getStepAttributeBoolean( id_step, \"file_add_time\" );\n      createparentfolder = rep.getStepAttributeBoolean( id_step, \"create_parent_folder\" );\n      DoNotOpenNewFileInit = rep.getStepAttributeBoolean( id_step, \"DoNotOpenNewFileInit\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unexpected error reading step information from the repository\", e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, \"id_connection\", databaseMeta );\n      rep.saveStepAttribute( id_transformation, id_step, \"schema\", schemaName );\n      rep.saveStepAttribute( id_transformation, id_step, \"table\", tablename );\n      rep.saveStepAttribute( id_transformation, id_step, \"truncate\", truncateTable );\n      rep.saveStepAttribute( id_transformation, id_step, \"create\", createTable );\n      rep.saveStepAttribute( id_transformation, id_step, \"encoding\", encoding );\n      rep.saveStepAttribute( id_transformation, id_step, \"dateformat\", dateformat );\n      rep.saveStepAttribute( id_transformation, id_step, \"addtoresult\", AddToResult );\n      rep.saveStepAttribute( id_transformation, id_step, \"startnewline\", StartNewLine );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"file_name\", fileName );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_extention\", extension );\n      rep.saveStepAttribute( id_transformation, id_step, \"file_append\", fileAppended );","sourceCodeStart":521,"sourceCodeEnd":557,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/sqlfileoutput/SQLFileOutputMeta.java#L521-L557","documentation":"SQLFileOutputMeta.readRep() loads the step's settings from the Pentaho Repository via rep.getStepAttribute* calls and wraps any failure in a KettleException 'Unexpected error reading step information from the repository'. It is a catch-all wrapper around repository reads for attributes like file_add_date, file_add_time, DoNotOpenNewFileInit.","triggerScenarios":"Opening a transformation from a repository when the repository is unreachable, the underlying database schema (r_step_attribute tables) is missing or corrupted, or a stored attribute value cannot be converted (e.g. non-boolean value for a boolean attribute).","commonSituations":"Repository database down or network interruption mid-load; repository schema version mismatch after a Pentaho upgrade; direct DB edits to repository tables that broke attribute values; permission problems reading repository tables.","solutions":["Check the chained cause: verify the repository database is reachable and credentials are valid","Validate the repository schema (r_step_attribute etc.) and repair/upgrade it with the repository upgrade tools","Re-save the transformation/step from Spoon to rewrite its repository attributes","Open the transformation from a file export instead to isolate whether the repository or the metadata is at fault"],"exampleFix":"// before: repository attribute hand-edited to a bad value\nUPDATE r_step_attribute SET value_str='maybe' WHERE code='DoNotOpenNewFileInit';\n// after\nUPDATE r_step_attribute SET value_str='N' WHERE code='DoNotOpenNewFileInit';","handlingStrategy":"try-catch","validationCode":"// Verify repository health before loading:\ntry ( Connection c = repositoryDatabase.connect() ) {\n  // ensure R_STEP_ATTRIBUTE is reachable\n  c.createStatement().executeQuery( \"SELECT 1 FROM R_STEP_ATTRIBUTE\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta = repository.loadTransformation( id, null );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"reading step information from the repository\" ) ) {\n    log.error( \"Repository read failed: {}\", e.getCause() );\n    // fall back to loading a file export\n  }\n}","preventionTips":["Keep repository schema upgraded to the PDI server version","Never hand-edit repository tables directly","Test repository connectivity before batch loads","Keep file exports as backups of repository content"],"tags":["kettle","pentaho","repository","metadata","database"],"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"}