Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Google Analytics Password as Variable

  1. #1
    Join Date
    May 2012

    Default Google Analytics Password as Variable

    Hi All,

    I could set userid, start date and end date as parameter for input to Google Analytics input. Is it possible to set password also as parameter?
    Since I have many transformation accessing same google analytics id, changing password for each transformation with change in GA password is troublesome. If I can pass password as parameter to google analytics input, I will have to change the password once only.

    Thanks in Advance

  2. #2
    Join Date
    Dec 2012


    I believe you can use the Script module (/experimental) in a transform. Upstream you could call the password (e.g table input) and pass it to the Script module. This allows you to use Java to insert it as an environment variable.

    The steps are tricky, but this is what I was able to do for a different operation (inserting a past date range into an Excel filename and worksheet name).

    The overall structure is to use a job to combine at least two transforms:
    The first transform is this:
    Name:  Snap14.jpg
Views: 29
Size:  11.6 KB

    The upstream value being passed to this module is "today". The output is todayStr. I used the Get System Info module to generate that value for my purpse, but you could use a Table Input module to lookup a field, or a Text Input module to view a text file with your password. Yet, you probably want to explore how to keep your passwords encrypted throughout this process. That's another layer of complexity for you to work on.
    Name:  Snap15.jpg
Views: 29
Size:  7.6 KB

    Name:  Snap9.jpg
Views: 28
Size:  41.3 KB

    The Set Environment Variables module makes them available for downstream use. Notice how the Variable name is in ALL CAPS. Apparently this is important for environment variables.
    Name:  Snap10.jpg
Views: 34
Size:  20.8 KB

    The next transform in the job pulls the variables using the Get Variables module:
    Name:  Snap16.jpg
Views: 28
Size:  7.2 KB

    The ALL CAPS issue comes into play here as well. (Can't seem to upload any more screenshots)
    The example I used inserted the Name as todayStr and the Variable as ${TODAYSTR} and the type as String.

    You could then insert this into the Password field (e.g. ${MYPASSWORD} )
    I inserted this into the Filename field and Sheet name field to append the date to those names.


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.