The Google Analytics step, which is located under the Input category in Spoon, allows you to access your Google analytics data to generate reports or to populate your data warehouse. It uses the Google Analytics 3.0 API.
The Google Analytics Query Explorer provides a dedicated website to developing and testing queries with the Google Analytics API, independently of a PDI transformation.
Option |
Description |
---|---|
Application Name |
Enter an application name such as "PDI" or leave the default. |
OAuth Service Email |
Your Google Developer Service Account's Email Address (e.g. "<random characters@developer.gserviceaccount.com>"). |
Key file |
The path to the P12 private key associated with your OAuth Service account. |
Specify tableId directly |
Check this option if you want to specify the tableId directly without getting the tableId from the profile. |
Get tableId from profile |
Select the tableId from your profile. |
Option |
Description |
---|---|
Start Date |
Specifies the start date associated with the query. The date must be entered in the following format: YYYY-MM-DD. |
End Date |
Specifies the end date associated with the query. The date must be entered in the following format: YYYY-MM-DD. |
Dimensions |
Specifies the dimension fields for which you want to query. The Google Analytics API documentation provides you with a list of valid inputs and metrics that can be combined. |
Metrics |
Specifies the metrics fields you want returned. At least one metric must be provided. |
Filters |
Specifies the filter (described in the Google Analytics API documentation). Here is an example: 'ga:country==Algeria'. |
Sort |
Specifies a field on which to sort. Here is an example: 'ga:city'. |
Specify a segment for the query |
Allows you to specify a segment for the query. A segment is analogous to a database "view." |
Use custom segment |
Check this option, when you want to specify a custom segment. A segment is analogous to a database "view." |
Use predefined segment |
Select from the predefined segments. A segment is analogous to a database "view." |
Click Get Fields to retrieve a list of possible fields based on the query you defined.
Click Preview to preview data based on the defined query.
All fields of this step support metadata injection. You can use this step with ETL Metadata Injection to pass metadata to your transformation at runtime.