Hitachi Vantara Pentaho Community Forums
Results 1 to 93 of 93

Thread: Google Analytics Input Step (Using GA 2.4 APIs) Erro

  1. #1
    Join Date
    Dec 2012
    Posts
    11

    Default Google Analytics Input Step (Using GA 2.4 APIs) Erro

    Hi everyone,


    I'm using the Google Analytics Step for extract some data, but some few hours ago just stopped and I received a error, nothing changed in API key or password.

    Name:  erro_ga_step.jpg
Views: 350
Size:  19.2 KB

    So, I asked a friend and same error shown to him.

    And now, I want to know if somebody can reproduce the same error or can explain the reason, because it works the Google Analytics Query Explorer and I think it's not a error on connections. Maybe Google have updated API again. True?

    Best,
    Átila Neumann

  2. #2
    Join Date
    Jun 2014
    Posts
    3

    Default

    We are seeing the same issue. I tried to regenerate the API key as well, thinking that it could be a random failure, but it seems to be an Analytics issue. Did they stop supporting non-OAuth 2.0 access?

  3. #3
    Join Date
    Jan 2014
    Posts
    11

    Default

    Hi everyone,

    I have the same issue.

  4. #4
    Join Date
    Dec 2014
    Posts
    3

    Default

    We have the same problem as well.

    2015/05/27 09:28:48 - All Visits 2.0 - com.google.gdata.util.AuthenticationException: Error authenticating (check service name)
    2015/05/27 09:28:48 - All Visits 2.0 - Error authenticating (check service name)
    2015/05/27 09:28:48 - All Visits 2.0 -
    2015/05/27 09:28:48 - All Visits 2.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.getNextDataEntry(GaInputStep.java:249)
    2015/05/27 09:28:48 - All Visits 2.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.processRow(GaInputStep.java:111)
    2015/05/27 09:28:48 - All Visits 2.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:60)
    2015/05/27 09:28:48 - All Visits 2.0 - at java.lang.Thread.run(Unknown Source)
    2015/05/27 09:28:48 - All Visits 2.0 - Caused by: com.google.gdata.util.AuthenticationException: Error authenticating (check service name)
    2015/05/27 09:28:48 - All Visits 2.0 - at com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:628)
    2015/05/27 09:28:48 - All Visits 2.0 - at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:500)
    2015/05/27 09:28:48 - All Visits 2.0 - at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:346)
    2015/05/27 09:28:48 - All Visits 2.0 - at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:362)
    2015/05/27 09:28:48 - All Visits 2.0 - at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:317)
    2015/05/27 09:28:48 - All Visits 2.0 - at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:301)
    2015/05/27 09:28:48 - All Visits 2.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.getNextDataEntry(GaInputStep.java:244)
    2015/05/27 09:28:48 - All Visits 2.0 - ... 3 more

  5. #5
    Join Date
    Jun 2013
    Posts
    9

    Default

    Same issue in here, working with new api keys didn't help as well.
    Any idea what could it be?

  6. #6
    Join Date
    Dec 2014
    Posts
    3

    Default

    We have the same issue.

  7. #7
    Join Date
    Jul 2011
    Posts
    21

    Default

    I'm having the same error in all my transformations (where I use the GA plugin). I re-entered the credentials, but nothing works. I re-created new API keys (even with all access, no IP-filter), but still nothing. Anybody an idea?
    Last edited by AmonRa; 05-27-2015 at 06:24 AM.

  8. #8

    Default

    Yeah, we've got the same error here. 99% sure it's because Google is deprecating their old client login framework, which is used by the GA connector. See here: https://developers.google.com/identi...rInstalledApps

    Basically, we're all in deep trouble until Pentaho releases a fix...

  9. #9

    Default

    I'm having the same error starting yesterday and full blown today. I guess it feels comforting knowing I'm not the only one but it is providing some problems.

    I am suspecting GA changed their API but I can't find any news or documentation of it. Go figure.

  10. #10
    Join Date
    Jun 2013
    Posts
    9

  11. #11
    Join Date
    Dec 2012
    Posts
    11

  12. #12
    Join Date
    Jul 2014
    Posts
    8

    Default

    Kind of glad, but pretty annoyed that I'm not the only one that this happened to. Anyone figure out a work-around without having to go through the oAuth2 process?

  13. #13
    Join Date
    Aug 2011
    Posts
    236

    Default

    Hi,

    According to http://www.daimto.com/google_service_account_php/ - you can setup a 'service account' but I'm not sure how the PHP code fits into the overall architecture or what additional steps you might need in your mappings.

    Hopefully there's a solution soon....
    PDI 8.0.0
    MySQL - 5.6.27
    Redshift - 1.0.1485
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

  14. #14
    Join Date
    Jun 2014
    Posts
    3

    Default

    Quote Originally Posted by tnewman View Post
    Hi,

    According to http://www.daimto.com/google_service_account_php/ - you can setup a 'service account' but I'm not sure how the PHP code fits into the overall architecture or what additional steps you might need in your mappings.

    Hopefully there's a solution soon....
    I wish I had the wherewithal to deconstruct the code of the plugin and redo it with OAuth 2.0, but I think we'll just move to PHP for the few KPI's we needed automated.

  15. #15

    Default

    I'm an R user as and I have written an R package (GAR) that interfaces with Google Analytics. I've integrated that into my solution.

    The basic process
    1) Create script.R file (requests, retrieves and then saves a CSV of the data)
    2) Execute R script using "Execute Process"
    3) CSV input step leads previously created CSV
    4) Flow into the remaining transformation steps.

    This new set of steps is saved and scheduled via the repository.

    Problems with this approach.
    1) You've gotta be an R user.
    2) If you're using variables you may have issues. Most of my scheduled process simply look back a few days so I've been able to set those in the R script. I have a some KTR files connected to report designer where you can input dates which were passed to the GA step... I haven't figured that one out yet.
    3) File paths are hard coded. I believe this is a must if the KTR is in the repository.

  16. #16
    Join Date
    Dec 2014
    Posts
    3

    Default

    I assume the best way to solve this is to create your own script to interface with Google Analytics? Unless the GA step is updated of course.

  17. #17
    Join Date
    Jan 2014
    Posts
    11

    Default

    Hi,

    So...We should wait for official solution, isn't it?

    1week?

  18. #18
    Join Date
    Jul 2011
    Posts
    21

    Default

    Quote Originally Posted by oscarmu View Post
    Hi,

    So...We should wait for official solution, isn't it?

    1week?
    I think so... I hope they will come with a patch soon because my production environment uses this information.

  19. #19

    Default

    I would be happy if they fix it fast.
    For me there is a further problem. Before they shut down the ClientLogin I queried the Analytics Management API (via REST) to get all accounts. Does anybody know how to authorize with oauth2 using the Java HttpClient (or something else)?

    Actually I have not figured out how to create the JWT (see: https://developers.google.com/identi...rizingrequests) to get my token for querying the API.

  20. #20

    Default

    Hey, I build an interface using PHP Google API on command line to get GA data based.

    I'm working on a released version to be shared with someone in need.

    The script just need some basic setup on getting the credentials from Google Developer account, and some command line parameters to download the data to a file, parameters like dimensions, metrics, data range, file name, delimiter and filters.

    If you want to get this script, just wait few hours as I'm setting up on my website:

    http://www.dataadventure.com/blog/da...ave-me-please/

    Hope it can help.

  21. #21
    Join Date
    Oct 2014
    Posts
    5

    Default

    The Google spreadsheet Plugin found at https://github.com/GlobalTechnology/...adsheet-plugin
    uses OAuth2.0.
    I am not so conversant with the coding aspect to put the two together. Hope this helps someone to resolve the GA Input step issue faster..

  22. #22

    Default

    For the GA step there are 'only' 200 lines source code. But the used library is deprecatet. Within the library oAuth2.0 exists but not in relation to the GA classes. In referral to Google the library should be changed (see: https://github.com/google/gdata-java-client).

    I believe a good Java dev can do it in 1 or 2 days

    Quote Originally Posted by aparnapaia View Post
    The Google spreadsheet Plugin found at https://github.com/GlobalTechnology/...adsheet-plugin
    uses OAuth2.0.
    I am not so conversant with the coding aspect to put the two together. Hope this helps someone to resolve the GA Input step issue faster..

  23. #23
    Join Date
    Dec 2012
    Posts
    11

    Default

    Quote Originally Posted by DavidStanitzki View Post
    I would be happy if they fix it fast.
    For me there is a further problem. Before they shut down the ClientLogin I queried the Analytics Management API (via REST) to get all accounts. Does anybody know how to authorize with oauth2 using the Java HttpClient (or something else)?

    Actually I have not figured out how to create the JWT (see: https://developers.google.com/identi...rizingrequests) to get my token for querying the API.
    You can get token code with this link:

    https://accounts.google.com/o/oauth2...ode&client_id=YOUR_CLIENT_ID&scope=https://www.googleapis.com/auth/analytics.readonly&redirect_uri=urn: ietf : wg : oauth : 2.0 : oob
    << Please, remove space character.
    Last edited by atilaneumann; 05-29-2015 at 09:38 AM.

  24. #24
    Join Date
    May 2015
    Posts
    1

    Default

    Hi Everyone,

    I am also facing same issue, using 5.0.1

    2015/05/28 15:09:32 - Google Analytics.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : Unexpected error
    2015/05/28 15:09:32 - Google Analytics.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : org.pentaho.di.core.exception.KettleException:
    2015/05/28 15:09:32 - Google Analytics.0 - com.google.gdata.util.AuthenticationException: Error authenticating (check service name)
    2015/05/28 15:09:32 - Google Analytics.0 - Error authenticating (check service name)
    2015/05/28 15:09:32 - Google Analytics.0 -
    2015/05/28 15:09:32 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.getNextDataEntry(GaInputStep.java:249)
    2015/05/28 15:09:32 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.processRow(GaInputStep.java:111)
    2015/05/28 15:09:32 - Google Analytics.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:60)
    2015/05/28 15:09:32 - Google Analytics.0 - at java.lang.Thread.run(Thread.java:745)
    2015/05/28 15:09:32 - Google Analytics.0 - Caused by: com.google.gdata.util.AuthenticationException: Error authenticating (check service name)
    2015/05/28 15:09:32 - Google Analytics.0 - at com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:628)
    2015/05/28 15:09:32 - Google Analytics.0 - at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:500)
    2015/05/28 15:09:32 - Google Analytics.0 - at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:346)
    2015/05/28 15:09:32 - Google Analytics.0 - at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:362)
    2015/05/28 15:09:32 - Google Analytics.0 - at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:317)
    2015/05/28 15:09:32 - Google Analytics.0 - at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:301)
    2015/05/28 15:09:32 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.getNextDataEntry(GaInputStep.java:244)
    2015/05/28 15:09:32 - Google Analytics.0 - ... 3 more

    Please help me how to fix it.

  25. #25
    Join Date
    May 2015
    Posts
    3

    Default

    Any updates so far? I still have the issue that I can't pull data from Google Analytics...even with an API key...

  26. #26
    Join Date
    Jan 2014
    Posts
    11

    Default

    Quote Originally Posted by netsrac27 View Post
    Any updates so far? I still have the issue that I can't pull data from Google Analytics...even with an API key...

    They are devoloping the solution to be launched with 5.4 release....

  27. #27
    Join Date
    Oct 2013
    Posts
    18

    Default

    Quote Originally Posted by oscarmu View Post
    They are devoloping the solution to be launched with 5.4 release....
    Hi! Does anybody knows when this version will be released?
    I checked in Jira and says 23 out of 23 issues solved, but any date commitment yet.

    Cheers!

  28. #28
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by azucena View Post
    Hi! Does anybody knows when this version will be released?
    I checked in Jira and says 23 out of 23 issues solved, but any date commitment yet.

    Cheers!
    I'm not sure exactly what you are looking at, but the important part to look at is:
    http://jira.pentaho.com/browse/PDI-13862

    Until this is flagged as "Resolved", it likely won't work.

  29. #29
    Join Date
    Oct 2013
    Posts
    18

    Default

    Quote Originally Posted by gutlez View Post
    I'm not sure exactly what you are looking at, but the important part to look at is:
    http://jira.pentaho.com/browse/PDI-13862

    Until this is flagged as "Resolved", it likely won't work.
    Thanks gutlez,

    I was looking at the roadmap for version 5.4
    http://jira.pentaho.com/browse/PDI-13875?filter=-4


    And the issue logged there was marked solved, same issue several times logged, typical.
    I guess we will just need to be patient for they to test and release.

    cheers!

  30. #30
    Join Date
    Dec 2014
    Posts
    7

    Default

    Hi All,

    do we have any solution to this? I am in big trouble as all our reporting is based on that.

    Anyone?

  31. #31
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by Jakub View Post
    Hi All,

    do we have any solution to this? I am in big trouble as all our reporting is based on that.

    Anyone?
    Jakub,

    Please read the whole thread. There is no current work-around, and there are several bugs open in Jira, several of which are not yet closed. Until they are closed, and the next release occurs, it will not work.

    However, if you are as stuck as you say, you can contact Pentaho, and see if you can get a support contract, which might help (no promises!)

  32. #32
    Join Date
    Jun 2015
    Posts
    8

    Default

    The Pentaho Wiki page is already referencing the GA 3.0 API but no reference on how to upgrade to it. Is the documentation out of sync with the product?
    http://wiki.pentaho.com/display/EAI/Google+Analytics

  33. #33

    Default

    I've created a work around (as I've detailed in a previous comment) but it's certainly not ideal.

    The previously mentioned workaround is working for jobs/transformations that I have running on the server nightly.

    I worked through a similar solution today for situations where Report Designer is using a KTR file with the GA step as a source.

    I'm still using R and the package GAR, but my problem became how do I inject variables into the script text dynamically. To accomplish this, I'm basically, I'm using a combination of 'get variables', 'generate rows' (where I have R script text) and 'group by' (too put it all together) to create the text script and a text file output to write that to a specific file location. I'm then using "execute a process" to run that script. The script itself writes a csv with the data I need. After all of that, a csv input step reads in that data and flows it into where the GA step would have.

    Yup, all of that is happening in one KTR file. I'm using some blocking steps to make sure scripts are written and executed before a csv file is read in.

    It's complicated but it's the only way I could figure out, using the knowledge I have, to get it to work. Obviously, you need to be comfortable in R and work through the set up of using GAR, etc...

    I'm sure it's possible to use other languages to work through a similar flow.

  34. #34
    Join Date
    Dec 2014
    Posts
    7

    Default

    Thanks Gutlez, appreciate your time. I am getting my guys to write up some Java code to go around it...if successful I will share it.

    Thanks,

    jakub

  35. #35
    Join Date
    Jul 2014
    Posts
    8

    Default Workaround

    I created a solution last week, but was super busy to create documentation for the workaround.

    After seeing many people still having issues, I created one to help the community out. Keep in mind, this should only be used as a temporary solution until Pentaho releases the new plugin. This solution doesn't require any extra plugins or any java coding. Just fill in some parameters and it should work. If you are writing code, you're doing it wrong. Also, I created the guide in a rush and on a small macbook and didn't proofread much, so please excuse the typos and grammar (if there are any). The forum wont let me upload a docx file, so I uploaded it on to my google drive.

    I'm almost positive people will have questions and I'll do my best to answer them.

    https://drive.google.com/file/d/0B3L...ew?usp=sharing

    Cheers!
    - Jon

  36. #36

    Default

    Thanks Jon!!

    I like your solution over my original work around. I didn't like having to read and write files to get the job done.

    I've tweaked it slightly for my own purpose (combined the refresh and data ktrs into one). That way I can use the one KTR as a data source in PRPT.

    Appreciate it. Worked great for me.


    Quote Originally Posted by jschoi1001 View Post
    I created a solution last week, but was super busy to create documentation for the workaround.

    After seeing many people still having issues, I created one to help the community out. Keep in mind, this should only be used as a temporary solution until Pentaho releases the new plugin. This solution doesn't require any extra plugins or any java coding. Just fill in some parameters and it should work. If you are writing code, you're doing it wrong. Also, I created the guide in a rush and on a small macbook and didn't proofread much, so please excuse the typos and grammar (if there are any). The forum wont let me upload a docx file, so I uploaded it on to my google drive.

    I'm almost positive people will have questions and I'll do my best to answer them.

    https://drive.google.com/file/d/0B3L...ew?usp=sharing

    Cheers!
    - Jon

  37. #37
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by asoenksen View Post
    The Pentaho Wiki page is already referencing the GA 3.0 API but no reference on how to upgrade to it. Is the documentation out of sync with the product?
    http://wiki.pentaho.com/display/EAI/Google+Analytics
    It was updated yesterday morning, so it may have been updated in preparation of a pending release.

  38. #38
    Join Date
    May 2011
    Posts
    13

    Default

    Thanks for the workaround. Trying to get it working but when I run GET_ACCESS_TOKEN (I've entered all requested parameters), token.txt contains '{"error": "invalid_request", "error_description": "Missing required parameter: code"}'. Coworker tried also and got the error.

    Any idea what parameters could be wrong? We've double checked all parameters and only copy/pasted...

    Quote Originally Posted by jschoi1001 View Post
    I created a solution last week, but was super busy to create documentation for the workaround.

    After seeing many people still having issues, I created one to help the community out. Keep in mind, this should only be used as a temporary solution until Pentaho releases the new plugin. This solution doesn't require any extra plugins or any java coding. Just fill in some parameters and it should work. If you are writing code, you're doing it wrong. Also, I created the guide in a rush and on a small macbook and didn't proofread much, so please excuse the typos and grammar (if there are any). The forum wont let me upload a docx file, so I uploaded it on to my google drive.

    I'm almost positive people will have questions and I'll do my best to answer them.

    https://drive.google.com/file/d/0B3L...ew?usp=sharing

    Cheers!
    - Jon

  39. #39
    Join Date
    Jul 2014
    Posts
    8

    Default

    Looks like you're missing the Authorization Code from part 1 of the guide. You'll need to fill out the AUTH_CODE parameter.

    Quote Originally Posted by danielpchow View Post
    Thanks for the workaround. Trying to get it working but when I run GET_ACCESS_TOKEN (I've entered all requested parameters), token.txt contains '{"error": "invalid_request", "error_description": "Missing required parameter: code"}'. Coworker tried also and got the error.

    Any idea what parameters could be wrong? We've double checked all parameters and only copy/pasted...

  40. #40
    Join Date
    Dec 2012
    Posts
    11

    Default

    Quote Originally Posted by jschoi1001 View Post
    I created a solution last week, but was super busy to create documentation for the workaround.

    After seeing many people still having issues, I created one to help the community out. Keep in mind, this should only be used as a temporary solution until Pentaho releases the new plugin. This solution doesn't require any extra plugins or any java coding. Just fill in some parameters and it should work. If you are writing code, you're doing it wrong. Also, I created the guide in a rush and on a small macbook and didn't proofread much, so please excuse the typos and grammar (if there are any). The forum wont let me upload a docx file, so I uploaded it on to my google drive.

    I'm almost positive people will have questions and I'll do my best to answer them.

    https://drive.google.com/file/d/0B3L...ew?usp=sharing

    Cheers!
    - Jon
    Jon,


    Cases when data results are more than 10.000?


    I'm developing on Python code and I came across that situation. And now, I'm trying create a loop for solve this.


    In your Step "Create GET URL Body" I see you fixed "max-results=10000" and is not a variable. So, I understood if my result is more than 10K rows, I can't to capture the total. Correct?


    Best,


    Átila

  41. #41
    Join Date
    Jul 2014
    Posts
    8

    Default

    Átila,

    The google analytics API wont let you return more than 10k rows of data with 1 call, so I created the ktr to call the API again with more than 10k data. The "Get Max Results" step shows how many rows will be returned. Then in the "create URL to split into rows" javascript step, it create urls to call the API again to return all the data past 10k. I'm sure there's a better way to do this, but this was quick and dirty, and it works.

    Hope that helps!


    Quote Originally Posted by atilaneumann View Post
    Jon,


    Cases when data results are more than 10.000?


    I'm developing on Python code and I came across that situation. And now, I'm trying create a loop for solve this.


    In your Step "Create GET URL Body" I see you fixed "max-results=10000" and is not a variable. So, I understood if my result is more than 10K rows, I can't to capture the total. Correct?


    Best,


    Átila

  42. #42
    Join Date
    Jun 2015
    Posts
    4

    Default

    Thank you Jon!

  43. #43
    Join Date
    Dec 2014
    Posts
    7

    Default

    Hi Jon,

    thank you so much for sharing this with us. I have to warn you that I am not a developer and nor very experienced with Kettle.

    I have an issue running the transformation GET ACCESS TOKEN. The output txt file has returns

    {
    "error": "invalid_request",
    "error_description": "Missing required parameter: code"
    }

    If it's not too much work would you be able to share screen shots of steps inside of this transformation? I understand if it's too much work.

    Thanks,

    jakub

  44. #44
    Join Date
    Jul 2014
    Posts
    8

    Default

    Quote Originally Posted by Jakub View Post
    Hi Jon,

    thank you so much for sharing this with us. I have to warn you that I am not a developer and nor very experienced with Kettle.

    I have an issue running the transformation GET ACCESS TOKEN. The output txt file has returns

    {
    "error": "invalid_request",
    "error_description": "Missing required parameter: code"
    }

    If it's not too much work would you be able to share screen shots of steps inside of this transformation? I understand if it's too much work.

    Thanks,

    jakub
    did you follow the guide to get an authorization code? if not, you should read the docx file. Has screenshots to get it.

  45. #45
    Join Date
    May 2011
    Posts
    13

    Default

    Same with me. Went through your instructions, all screenshots matched up, and I got to the url with code - https://www.example.com/oauth2callba...vw2M31VEd0mwI#.

    Entered the code into the post step but got the error saying the code parameter is missing.

  46. #46
    Join Date
    Jul 2014
    Posts
    8

    Default

    are you guys adding it to the parameters when executing the transformation? screenshot attached

    Last edited by jschoi1001; 06-04-2015 at 04:28 PM.

  47. #47
    Join Date
    Aug 2011
    Posts
    236

    Default

    Hi,

    I had grant errors but now get '"Code was already redeemed."' - How can I correct this? I tried resetting the client secret but no dice. I am setting all 4 parameters

    Thanks,
    PDI 8.0.0
    MySQL - 5.6.27
    Redshift - 1.0.1485
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

  48. #48
    Join Date
    Jul 2014
    Posts
    8

    Default

    That means you had a successful try that returned an Access/Refresh token. Once you exchange the auth code for a token, the auth code no longer works and assumes you'll use the refresh token to obtain a new access token. If you didn't store the refresh token, you'll need to go through the steps to get a new Authorization Code.

    Quote Originally Posted by tnewman View Post
    Hi,

    I had grant errors but now get '"Code was already redeemed."' - How can I correct this? I tried resetting the client secret but no dice. I am setting all 4 parameters

    Thanks,

  49. #49
    Join Date
    Aug 2011
    Posts
    236

    Default

    Got it - Thanks.
    PDI 8.0.0
    MySQL - 5.6.27
    Redshift - 1.0.1485
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

  50. #50
    Join Date
    Jan 2014
    Posts
    11

    Default

    Hello,

    Any official solution? All tickets are closed but I didn't see any Kettle update.
    5.4 is out but I couldn't get the download link.

    http://jira.pentaho.com/browse/PDI/?...hangelog-panel
    Last edited by oscarmu; 06-08-2015 at 09:38 AM.

  51. #51
    Join Date
    Dec 2012
    Posts
    11

    Default

    Guys,

    Follow link the PDI GA Plugin Fixed.

    I hope help you guys.

    Remember this plugin was extracted Alpha version PDI 5.4.

    Best,
    Átila

  52. #52
    Join Date
    Jun 2015
    Posts
    5

    Default

    Hi Átila, could you send me the plugin in a private message or something? I couln't download it via 4shared.

    Valeu!

  53. #53
    Join Date
    Dec 2013
    Posts
    14

    Default

    Quote Originally Posted by atilaneumann View Post
    Guys,

    Follow link the PDI GA Plugin Fixed.



    I hope help you guys.

    Remember this plugin was extracted Alpha version PDI 5.4.

    Best,
    Átila
    Hi Atila,

    I´m new in this, I just have to paste it inside the plugin folder? Because I do it and the transformation logo became weird and the password field disappeared. Thanks in advance!

    Edgar

  54. #54
    Join Date
    Jan 2014
    Posts
    11

    Default

    Quote Originally Posted by atilaneumann View Post
    Guys,

    Follow link the PDI GA Plugin Fixed.



    I hope help you guys.

    Remember this plugin was extracted Alpha version PDI 5.4.

    Best,
    Átila
    Thank you guy.
    But where can I find 5.4.0GA?

    Thank you

  55. #55
    Join Date
    Dec 2012
    Posts
    11

    Default

    Quote Originally Posted by edgardlt View Post
    Hi Atila,

    I´m new in this, I just have to paste it inside the plugin folder? Because I do it and the transformation logo became weird and the password field disappeared. Thanks in advance!

    Edgar
    Yes. I just included in my Kettle 5.3 plugin folder and started works. But the logo really is weird because is not final version, but it works.
    Last edited by atilaneumann; 06-08-2015 at 05:18 PM.

  56. #56
    Join Date
    Dec 2012
    Posts
    11

    Default

    Quote Originally Posted by oscarmu View Post
    Thank you guy.
    But where can I find 5.4.0GA?

    Thank you
    Just open link bellow...

    http://bit.ly/PDI_GA_oAuth

  57. #57
    Join Date
    Dec 2013
    Posts
    14

    Default

    Quote Originally Posted by atilaneumann View Post
    Yes. I just included in my Kettle 5.3 plugin folder and started works. But the logo really is weird because is not final version, but it works.
    But the password field does not appear so it don´t let me connect . Thanks for your help!

  58. #58
    Join Date
    Dec 2013
    Posts
    14

    Default

    Quote Originally Posted by edgardlt View Post
    But the password field does not appear so it don´t let me connect . Thanks for your help!
    It was my bad! I didn´t see that the connection Settings were different now. Here are the instructions if someone has the same confusion as me... http://wiki.pentaho.com/display/EAI/Google+Analytics

    Thanks for the plugin Atila!

  59. #59
    Join Date
    Jan 2014
    Posts
    11

    Default

    Quote Originally Posted by atilaneumann View Post
    Just open link bellow...

    http://bit.ly/PDI_GA_oAuth
    I'm looking for PDI 5.4.0...

  60. #60
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    Hi Oscar,
    you can download the latest version of PDI 5.4 from sourceforge:
    http://sourceforge.net/projects/pent...tegration/5.4/
    -- Mick --

  61. #61
    Join Date
    Dec 2012
    Posts
    11

    Default

    Quote Originally Posted by edgardlt View Post
    But the password field does not appear so it don´t let me connect . Thanks for your help!
    oAuth authentication have a new process for connect. Please, see the documentation in Wiki.

    http://wiki.pentaho.com/display/EAI/Google+Analytics

  62. #62
    Join Date
    Jan 2014
    Posts
    11

    Default

    Great, works! (5.4.0GA)

    But...I can't run jobs using Kitchen. Anybody with the same problem?

    Thank you

    --------Edit-------
    Ok....chmod +x *.sh was the solution
    Last edited by oscarmu; 06-09-2015 at 11:49 AM.

  63. #63
    Join Date
    Jun 2015
    Posts
    5

    Default

    Download of Windows version of PDI 5.4 is running veeeery slow by Pentaho site (13kb/s). Do you guys know any mirror of the site besides Sourceforge for downloading it?

    Valeu!

  64. #64
    Join Date
    Jan 2013
    Posts
    7

    Default

    Hi. I couldn't download the new plugin. Can anyone share it somewhere else?
    Also, I've installed 5.4 and the googe analytics step works as long as I'm using only one dimension. If I write
    ga:browser,ga:city
    in the dimensions box, I fail:
    2015/06/10 16:34:45 - Google Analytics.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Unexpected error
    2015/06/10 16:34:45 - Google Analytics.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : java.lang.NullPointerException
    2015/06/10 16:34:45 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.getNextDataEntry(GaInputStep.java:268)
    2015/06/10 16:34:45 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.processRow(GaInputStep.java:93)
    2015/06/10 16:34:45 - Google Analytics.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
    2015/06/10 16:34:45 - Google Analytics.0 - at java.lang.Thread.run(Thread.java:695)

  65. #65
    Join Date
    Jan 2014
    Posts
    11

    Default

    Quote Originally Posted by gluz View Post
    Hi. I couldn't download the new plugin. Can anyone share it somewhere else?
    Also, I've installed 5.4 and the googe analytics step works as long as I'm using only one dimension. If I write in the dimensions box, I fail:
    I noticed that new GA plugin have a bug when no rows are found (NullPointerException). I opened an issue on jira http://jira.pentaho.com/browse/PDI-13925

  66. #66
    Join Date
    Jun 2015
    Posts
    5

    Default

    It also happens when rows exist (as below)

    2015/06/10 10:54:32 - carregaPedidos.ktr : carregaPedidos - Dispatching started for transformation [carregaPedidos.ktr : carregaPedidos]
    2015/06/10 10:54:33 - GA - Pedidos.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Unexpected error
    2015/06/10 10:54:33 - GA - Pedidos.0 - ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : java.lang.NullPointerException
    2015/06/10 10:54:33 - GA - Pedidos.0 - Finished processing (I=0, O=0, R=0, W=1000, U=0, E=1)
    2015/06/10 10:54:33 - dummy.0 - Finished processing (I=0, O=0, R=902, W=902, U=0, E=0)
    2015/06/10 10:54:33 - carregaPedidos.ktr : carregaPedidos - Transformation detected one or more steps with errors.
    2015/06/10 10:54:33 - carregaPedidos.ktr : carregaPedidos - Transformation is killing the other steps!

    I'm going to insert a comment on oscarmu ticket @ JIRA.

  67. #67
    Join Date
    Jun 2015
    Posts
    3

    Default

    Hello everyone, new user here, struggling to use the Google Analytics step in Kettle. Hopefully somebody can help me along.

    Problem: Authentication Failure

    First lines in Log:
    ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Authentication failure occurred when contacting Google Analytics.
    Please verify the credentials in the service account email and key file fields as well as your network connectivity.
    ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
    org.pentaho.di.trans.steps.googleanalytics.GaInputStepMeta@304d0259 - {
    org.pentaho.di.trans.steps.googleanalytics.GaInputStepMeta@304d0259 - "error" : "invalid_grant"
    org.pentaho.di.trans.steps.googleanalytics.GaInputStepMeta@304d0259 - }


    - Got a project with Google Analytics API Enabled
    - Generated service account credentials and entered the service mail account to the Google Analytics account user management/permissions.
    - Included the service mail account in OAuth Service Email
    - Included C:\pathto\key.p12

    I can't use buttons: Get profiles, Get segments, Get fields. (obviously, since there is no authentication)

    Googling error invalid grant result in some tips about syncing time which I've tried without succes.

    Any thoughts? Thanks!

  68. #68
    Join Date
    Jun 2015
    Posts
    3

    Default

    Hello everyone, new user here. I'm struggling to get authentication going in Kettle's Google Analytics step. The following errors are thrown at me when I try buttons Get Profiles or Get fields or run the transformation job.

    ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : Authentication failure occurred when contacting Google Analytics.
    Please verify the credentials in the service account email and key file fields as well as your network connectivity.
    ERROR (version 5.4.0.0-128, build 1 from 2015-06-03_13-41-59 by buildguy) : com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
    org.pentaho.di.trans.steps.googleanalytics.GaInputStepMeta@304d0259 - {
    org.pentaho.di.trans.steps.googleanalytics.GaInputStepMeta@304d0259 - "error" : "invalid_grant"
    org.pentaho.di.trans.steps.googleanalytics.GaInputStepMeta@304d0259 - }

    I've googled and looked around for about 3 workdays, no success.
    Followed the steps of the recent guide: http://wiki.pentaho.com/display/EAI/Google+Analytics

    Got permissions of the API enabled, added service account email to Analytics users...

    The invalid grant points at a possible error with time syncing which I've tried to resolve using some guides and regedit.

    Kind of at a loss here. Hopefully one of you can help me out. Thanks!

    (Working from a Windows 7 desktop)

  69. #69
    Join Date
    Nov 2011
    Posts
    5

    Default

    This happens when there are no output rows to write or when there are more than 1000 rows. Is there any solution for this bug?

  70. #70
    Join Date
    Jun 2015
    Posts
    8

    Default

    I've followed the steps on http://wiki.pentaho.com/display/EAI/Google+Analytics and cannot get the plug-in to authenticate. Is there something additional that needs to be done?

  71. #71
    Join Date
    Jun 2015
    Posts
    8

    Default

    Quote Originally Posted by asoenksen View Post
    I've followed the steps on http://wiki.pentaho.com/display/EAI/Google+Analytics and cannot get the plug-in to authenticate. Is there something additional that needs to be done?
    I've been able to determine that this is a firewall issue, but I cannot find what url needs to be whitelisted in order for this process to work. Any help? Thanks!

  72. #72
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    If it is a firewall issue, then you usually need to unblock a IP address or a PORT. Unless your firewall acts as a web filter as well and blocks some websites.
    But the only people who can do something about it (and help you) are the IT who set up that firewall.

    Unless you want to know which URL to whitelist - my guess is that you need to whitelist anything Google!
    -- Mick --

  73. #73
    Join Date
    Jun 2015
    Posts
    5

    Default

    Hi guys, have U got any news about the fix or even a workaround for the fact Input Step can't handle more than 500 rows or so?

  74. #74

    Default

    There is already an open pull request: https://github.com/pentaho/pentaho-k...ull/1364/files

    I believe this will fix it. Maybe I can try it today

    Quote Originally Posted by famarx View Post
    Hi guys, have U got any news about the fix or even a workaround for the fact Input Step can't handle more than 500 rows or so?

  75. #75

    Default

    Quote Originally Posted by DavidStanitzki View Post
    There is already an open pull request: https://github.com/pentaho/pentaho-k...ull/1364/files

    I believe this will fix it. Maybe I can try it today
    This fix is working fine. While it is not merged to master and 5.4 branch you can compile it by yourself against master with this sourcecode change. A further pull request for GA Step is standing by - I don't know what is purposed with this change.

    Edit: It looks like within this fix there is no fix for "no rows"
    Last edited by DavidStanitzki; 06-12-2015 at 01:37 PM.

  76. #76
    Join Date
    Jun 2015
    Posts
    8

    Default

    Quote Originally Posted by Mick_data View Post
    Unless you want to know which URL to whitelist - my guess is that you need to whitelist anything Google!
    Yes, I'm trying to find an IP range or a URL to whitelist. Unfortunately, our IT does not allow wildcards so I can't do *google.com.

  77. #77
    Join Date
    Jun 2015
    Posts
    5

    Default

    Quote Originally Posted by DavidStanitzki View Post
    This fix is working fine. While it is not merged to master and 5.4 branch you can compile it by yourself against master with this sourcecode change. A further pull request for GA Step is standing by - I don't know what is purposed with this change.

    Edit: It looks like within this fix there is no fix for "no rows"
    I'm using WIndows 64 version. I couldn't find out how to recompile the JAVA fix and how to assemble it to my files. How can I do it?

  78. #78

    Default

    On sourceforge version 5.4.0.1 (build 130) is available
    http://sourceforge.net/projects/pent...d?source=files
    I've not tested, but this build should include the GA Step change.

  79. #79

    Default

    Quote Originally Posted by DavidStanitzki View Post
    On sourceforge version 5.4.0.1 (build 130) is available
    http://sourceforge.net/projects/pent...d?source=files
    I've not tested, but this build should include the GA Step change.
    Seems that the problem with paging is fixed, but not with empty result set.

  80. #80
    Join Date
    Nov 2011
    Posts
    5

    Default

    Quote Originally Posted by DavidStanitzki View Post
    On sourceforge version 5.4.0.1 (build 130) is available
    http://sourceforge.net/projects/pent...d?source=files
    I've not tested, but this build should include the GA Step change.
    The problem with paging is fixed, but not with empty result set.

  81. #81

    Default

    To fix the "no row problem" I added in pentaho-kettle/plugins/googleanalytics/src/org/pentaho/di/trans/steps/googleanalytics/GaInputStep.java
    after Line 269 (List<List<String>> entries = data.feed.getRows();)

    the following code:

    Code:
    if (entries == null) {
      return null;
    }
    In my testcase I don't get an exception. I don't know if it will cause an other error.

    For more information for compling see readme.txt (short: you need ant, start terminal/command line, run "ant dist" in root folder of your spoon source code, wait, a new folder dist is created with a runable spoon)

    I'm not a specialist in licences, so I am not going to upload the compiled jar to this forum.
    Last edited by DavidStanitzki; 06-15-2015 at 11:15 AM. Reason: clarification

  82. #82

    Default

    They reopened ticket http://jira.pentaho.com/browse/PDI-13925
    A pull request exists: https://github.com/pentaho/pentaho-k...ull/1392/files

    It's "close to my change". You see I'm not a Java Dev
    Maybe it will be productive in 1 or 2 weeks.

  83. #83

    Default

    One problem I'm getting with the current version is that whenever the result set is more that 1000 rows, the 1001st row is a duplicate (same dimensions, same metrics) of the previous one.

  84. #84
    Join Date
    Nov 2011
    Posts
    5

    Default

    Quote Originally Posted by Rodrigo Baeza View Post
    One problem I'm getting with the current version is that whenever the result set is more that 1000 rows, the 1001st row is a duplicate (same dimensions, same metrics) of the previous one.
    I've experienced the same issue.

  85. #85

    Default

    Quote Originally Posted by peresl View Post
    I've experienced the same issue.
    Same here. I created a new Bug Ticket http://jira.pentaho.com/browse/PDI-13981

    Workaround: Use "Unique rows" step after GA Input Step

  86. #86
    Join Date
    Jan 2013
    Posts
    7

    Default

    Can anyone share a link to the fixed plugin of 5.3?

  87. #87
    Join Date
    Dec 2012
    Posts
    11

    Default

    Guys,

    Someone have problems the kind receive the message error "Read Time Out"?
    For me, this happen in random times when I extract a lot data.

  88. #88
    Join Date
    Jan 2014
    Posts
    11

    Default

    I still have problems when no rows returned.
    Anybody with the same issue?

    Thanks

  89. #89
    Join Date
    Jul 2015
    Posts
    4

    Default

    Hello,

    I am new to Pentaho, and I ran into problems with GA integration too, with this error :

    2015/08/03 15:10:46 - Google Analytics.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : Erreur inattendue
    2015/08/03 15:10:46 - Google Analytics.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : java.lang.NullPointerException: Required parameter ids must be specified.
    2015/08/03 15:10:46 - Google Analytics.0 - at com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:208)
    2015/08/03 15:10:46 - Google Analytics.0 - at com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:140)
    2015/08/03 15:10:46 - Google Analytics.0 - at com.google.api.services.analytics.Analytics$Data$Ga$Get.<init>(Analytics.java:236)
    2015/08/03 15:10:46 - Google Analytics.0 - at com.google.api.services.analytics.Analytics$Data$Ga.get(Analytics.java:182)
    2015/08/03 15:10:46 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.getQuery(GaInputStep.java:164)
    2015/08/03 15:10:46 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.getNextDataEntry(GaInputStep.java:236)
    2015/08/03 15:10:46 - Google Analytics.0 - at org.pentaho.di.trans.steps.googleanalytics.GaInputStep.processRow(GaInputStep.java:93)
    2015/08/03 15:10:46 - Google Analytics.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
    2015/08/03 15:10:46 - Google Analytics.0 - at java.lang.Thread.run(Thread.java:745)

    I created the API but I am not the admin of our GA network. An admin gave the required authorizations to the API and I carefully followed the steps of the wiki. Do you have any idea ?
    To be more precise : I can't use the "Get Fields" (from the GA step) nor anything related to our GA application.

    Thanks for your answers

  90. #90
    Join Date
    Nov 2011
    Posts
    5

    Default

    The ticket http://jira.pentaho.com/browse/PDI-13925 is resolved. Any idea about how or where can we get the new google analytics step?

  91. #91
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    5.4 has it
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  92. #92
    Join Date
    Nov 2011
    Posts
    5

    Default

    No it hasn't. Version version 5.4.0.1-130 (the last available for download at http://community.pentaho.com/projects/data-integration) doesn't have the updated step.

  93. #93

    Default

    Hi oscarmu,

    I'm having the same issue with this analytics. What should I do to fix it?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.