{"record":{"id":"6654c1ff15d17c48","repo":"pentaho/pentaho-kettle","slug":"googleanalytics-error-unabletosavetorep","errorCode":null,"errorMessage":"GoogleAnalytics.Error.UnableToSaveToRep","messagePattern":"GoogleAnalytics\\.Error\\.UnableToSaveToRep","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":612,"sourceCode":"      rep.saveStepAttribute( id_transformation, id_step, \"useSegment\", useSegment );\n      rep.saveStepAttribute( id_transformation, id_step, \"useCustomSegment\", useCustomSegment );\n      rep.saveStepAttribute( id_transformation, id_step, \"customSegment\", customSegment );\n      rep.saveStepAttribute( id_transformation, id_step, \"segmentId\", segmentId );\n      rep.saveStepAttribute( id_transformation, id_step, \"segmentName\", segmentName );\n      rep.saveStepAttribute( id_transformation, id_step, \"samplingLevel\", samplingLevel );\n      rep.saveStepAttribute( id_transformation, id_step, \"rowLimit\", rowLimit );\n\n      for ( int i = 0; i < feedField.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"feedFieldType\", feedFieldType[ i ] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"feedField\", feedField[ i ] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"outField\", outputField[ i ] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"conversionMask\", conversionMask[ i ] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"type\", ValueMetaFactory.getValueMetaName( outputType[ i ] ) );\n\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GoogleAnalytics.Error.UnableToSaveToRep\" )\n        + id_step, e );\n    }\n  }\n\n  @Override\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n                     RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n                     Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n\n    if ( prev == null || prev.size() == 0 ) {\n      cr =\n        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(\n          PKG, \"GoogleAnalytics.CheckResult.NotReceivingFields\" ), stepMeta );\n      remarks.add( cr );\n    } else {\n      cr =\n        new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(","sourceCodeStart":594,"sourceCodeEnd":630,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/google-analytics/core/src/main/java/org/pentaho/di/trans/steps/googleanalytics/GaInputStepMeta.java#L594-L630","documentation":"GaInputStepMeta.saveRep wraps any exception raised while persisting Google Analytics step attributes (profiles, metrics, dimensions, conversion masks, output types) to the repository. The message is concatenated with the id_step for identification. Thrown because a failed save would silently lose step configuration.","triggerScenarios":"Calling saveRep(Repository, IMetaStore, ObjectId, ObjectId) when any rep.saveStepAttribute(...) call fails — connection loss, insufficient write permission, DB constraint/size violation on long metric/dimension lists.","commonSituations":"Saving with a read-only repository account; very long dimension/metric lists exceeding column sizes; network drop during save; repository backend database full.","solutions":["Check the nested cause for the underlying repository/SQL error (permissions, limits, connectivity).","Connect with a repository user that has write permission on the transformation directory.","Reconnect and retry the save.","Reduce the number/length of stored fields if repository column limits are exceeded."],"exampleFix":"// before\nrep.save( transMeta, \"path\", null ); // fails with read-only user\n\n// after\nrep.disconnect();\nrep.connect( writableUser, password );\nrep.save( transMeta, \"path\", null );","handlingStrategy":"try-catch","validationCode":"if ( !rep.isConnected() || !rep.hasPermission( dir, PermissionMeta.TYPE_PERMISSION_MODIFY ) ) {\n  throw new KettleException( \"Repository not writable\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  rep.save( transMeta, path, null );\n} catch ( KettleException e ) {\n  log.error( \"saveRep failed: \" + e.getMessage(), e.getCause() );\n}","preventionTips":["Use write-enabled repository accounts","Watch DB column limits for long metric/dimension lists","Retry saves after transient network failures"],"tags":["repository","metadata-save","google-analytics"],"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"}