{"record":{"id":"e21eb78573854f62","repo":"pentaho/pentaho-kettle","slug":"googleanalytics-error-unabletoreadfromrep","errorCode":null,"errorMessage":"GoogleAnalytics.Error.UnableToReadFromRep","messagePattern":"GoogleAnalytics\\.Error\\.UnableToReadFromRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/google-analytics/core/src/main/java/org/pentaho/di/trans/steps/googleanalytics/GaInputStepMeta.java","lineNumber":573,"sourceCode":"      rowLimit = (int) rep.getStepAttributeInteger( id_step, \"rowLimit\" );\n\n      int nrFields = rep.countNrStepAttributes( id_step, \"feedField\" );\n      allocate( nrFields );\n\n      for ( int i = 0; i < nrFields; i++ ) {\n\n        feedFieldType[ i ] = rep.getStepAttributeString( id_step, i, \"feedFieldType\" );\n        feedField[ i ] = rep.getStepAttributeString( id_step, i, \"feedField\" );\n        outputField[ i ] = rep.getStepAttributeString( id_step, i, \"outField\" );\n        outputType[ i ] = ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, \"type\" ) );\n        conversionMask[ i ] = rep.getStepAttributeString( id_step, i, \"conversionMask\" );\n\n        if ( outputType[ i ] < 0 ) {\n          outputType[ i ] = ValueMetaInterface.TYPE_STRING;\n        }\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GoogleAnalytics.Error.UnableToReadFromRep\" ), e );\n    }\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )\n    throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"oauthServiceAccount\", oauthServiceAccount );\n      rep.saveStepAttribute( id_transformation, id_step, \"oauthKeyFile\", oauthKeyFile );\n      rep.saveStepAttribute( id_transformation, id_step, \"appName\", gaAppName );\n      rep.saveStepAttribute( id_transformation, id_step, \"profileName\", gaProfileName );\n      rep.saveStepAttribute( id_transformation, id_step, \"profileTableId\", gaProfileTableId );\n      rep.saveStepAttribute( id_transformation, id_step, \"customTableId\", gaCustomTableId );\n      rep.saveStepAttribute( id_transformation, id_step, \"useCustomTableId\", useCustomTableId );\n      rep.saveStepAttribute( id_transformation, id_step, \"startDate\", startDate );\n      rep.saveStepAttribute( id_transformation, id_step, \"endDate\", endDate );\n      rep.saveStepAttribute( id_transformation, id_step, \"dimensions\", dimensions );\n      rep.saveStepAttribute( id_transformation, id_step, \"metrics\", metrics );","sourceCodeStart":555,"sourceCodeEnd":591,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/google-analytics/core/src/main/java/org/pentaho/di/trans/steps/googleanalytics/GaInputStepMeta.java#L555-L591","documentation":"GaInputStepMeta.readRep wraps any exception raised while loading Google Analytics step settings from a Kettle repository into a KettleException with the localized 'GoogleAnalytics.Error.UnableToReadFromRep' message. It guards the repository reads for ga fields, conversion masks and output types, defaulting invalid output types to TYPE_STRING before the catch.","triggerScenarios":"Calling readRep(Repository, IMetaStore, ObjectId, List<DatabaseMeta>) when rep.getStepAttributeString/... calls for id_step throw — dead repository connection, missing step row, or repository driver error.","commonSituations":"Opening a stored transformation while the repository DB is unreachable; step attributes partially deleted; repository schema changed between Pentaho versions so expected attributes are absent.","solutions":["Check the nested cause for the real repository/driver failure and fix connectivity or schema issues.","Reconnect the repository and reload the transformation.","Re-save the step from a working client to restore missing attributes.","Verify plugin version compatibility with the repository content."],"exampleFix":"// before\nTransMeta tm = new TransMeta( rep, id, metaStore ); // throws on stale connection\n\n// after\nif ( !rep.isConnected() ) {\n  rep.connect( user, pass );\n}\nTransMeta tm = new TransMeta( rep, id, metaStore );","handlingStrategy":"try-catch","validationCode":"if ( rep == null || !rep.isConnected() ) {\n  rep.connect( user, pass );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta = new TransMeta( rep, id, metaStore );\n} catch ( KettleException e ) {\n  log.error( \"readRep failed: \" + e.getMessage(), e.getCause() );\n}","preventionTips":["Verify repository connectivity before loading","Re-save steps after upgrading Pentaho versions","Log nested causes to diagnose repository schema mismatches"],"tags":["repository","metadata-read","google-analytics"],"backgroundTag":"file-read-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"}