Talend Exchange is the place where Talend community can share items
related to Talend opensource products, such as Data Integration, Data Quality and Data Master Management.
Contribution is open to any user, no specific validation is needed.
As soon as you have your forum account, you automatically get a Talend Exchange account.
About: Lets you query Google Analytics data.
You find this component in the palette in section Business->Google.
This component use the latest GA-API version 3 (Java API 1.12) and OAuth-API 2.0.
A configured service account is needed and must be added to your Analytics Account (+profile).
Component returns (after):
- error_message,
- amount or rows used to create result set
- flag if data are sampled
- number of lines delivered
The dimensions and metrics are defined in the notation of the Google API.
In the Advance section you can optimize the perfomance by changing the fetch size and avoid problems by changing the timeout (also used for read timeout).
There is also an advanced option to reuse the client (avoid multiple logins in iterations).
Contact: jan.lolling@cimt-ag.de
Do not hesitate to contact me if you have proposals or experiences problems, especially for the common typical problems Talend causes in case of user components.
Please read the help page linked in the component detail page.
Google Core Reporting API Reference: Here you can retrieve all available parameters (dimensions, metrics, sorts, filters and so on) what you need to build your query
Google Core Reporting API Explorer: Here you can test your queries. The input ids is identical to the profiles-ID which will entered directly (without any prefix) in the tGoogleAnalyticsInput component.
Code generation optimization.
Avoid problems with not null values.
If you expierence problems with missing jars, please delete the file configuration/ComponentCache.javacache and restart Studio. (If you use the commandline do the same for it!).
If that does not help - please keep in mind these are all problems caused by Talend not by the component - do following:
1. copy the component to any directory (and keep this dir in mind) of your computer
2. In Preferences set Talend Component Development directory to the former choosed directory where you copied the component to
3. Switch to the component development perspective
4. right klick with the mouse on component dir and choose Push components to palette. After doing that, the Generation Engine should restart automatically.
That cause Talend to intergrate components in the strongest way.
New API version r15 1.8.0 used. This is necessary to avoid conflicts with the new component tGoogleAnalyticsMCFInput which depends on this version.
There is a problem with the code generator if this component has no out going connections attached. In this case the code generator fails, because of this component need an out going connection it shouldn t be a problem.
If you expierence problems with missing jars, please delete the file configuration/ComponentCache.javacache and restart Studio. (If you use the commandline do the same for it!).
If that does not help - please keep in mind these are all problems caused by Talend not by the component - do following:
1.copy thes component to any location of your computer
2. In Preferences set Talend Component Development directory to the directory where you copied the component
3. Switch to the component development perspective
4. klick with mous on component and choose Push components to palette.
That cause Talend to intergrate components in the strongest way.
Problem solved with dimension ga:date. Please ensure, that schema has date pattern yyyyMMdd (double qouted) for ga:date dimension.
The locale for number format is now requiered. Fortunately the default value is set correctly, so there is no need to change that in 99,99% of all cases.
* New library version google-analytics-lib used (v1.7.1 beta)
* Problem with \"invalid grant\" (or in former version \"login required\") error solved:
This problem happens if the application runs in the future from Google point of view, means if the local clock is a bit to early.
To avoid that problem, there is a new advanced option to add a time offset into the past to be sure that the component runs always in the past from googles point of view, otherwise refreshing access token fails.
* Dimensions are not requiered anymore.
Bugs fixed:
If running in iteration with reusage client, start index will not start index at 1
NullPointerException if last paging returns zero data sets.
Fixed client reusage.
Improved client sharing with key extension.
The Key to reuse the client will build by:
component id + jobName + optinal given additional key (to separate the clients if you plan to run the same job simultaniously)
adds more return values,
improved performance,
totals can included into the resultset
Please be aware, that the componente job properties will be reset if you use an older version already in your jobs!
This is a great component and it works fine but Iit's not possible to limit the results. I don't want to store all the results in my database. Is it possible to add a parameter to set max-results?
I just downloaded the last version but when trying to launch the job, I get errors (in the code windows) indicating this :
de.cimt.talendcomp.googleanalytics.GoogleAnalyticsInput
"de. cannot be resolved"
Did I miss anything in the installation process ?
Works like a charm, and since it uses OAuth it is about as future proof as you can get. Two suggestions from the author to get it to work right out of the box:
1) After you create your service account key in the Google API Console add your service account email as a user of the GA profiles you're using.
2) Delete the ComponentCache.javacache in the configuration subdirectory and restart Studio to get rid of the "jar not found" error after install.
Exception in component tGoogleAnalyticsInput_1
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
{
\"error\" : \"invalid_grant\"
}
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:103)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:303)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:323)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:340)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:505)
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:266)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:857)
at com.google.api.client.googleapis.json.GoogleJsonResponseException.execute(GoogleJsonResponseException.java:182)
at com.google.api.client.googleapis.services.GoogleClient.executeUnparsed(GoogleClient.java:279)
at com.google.api.client.http.json.JsonHttpRequest.executeUnparsed(JsonHttpRequest.java:207)
at com.google.api.services.analytics.Analytics$Data$Ga$Get.execute(Analytics.java:1622)
at de.cimt.talendcomp.googleanalytics.GoogleAnalyticsInput.executeDataQuery(GoogleAnalyticsInput.java:260)
at de.cimt.talendcomp.googleanalytics.GoogleAnalyticsInput.executeQuery(GoogleAnalyticsInput.java:303)
at dheeraj.gtest_0_1.gtest.tGoogleAnalyticsInput_1Process(gtest.java:493)
at dheeraj.gtest_0_1.gtest.runJobInTOS(gtest.java:822)
at dheeraj.gtest_0_1.gtest.main(gtest.java:690)
[statistics] disconnected
UK Vehicle Registration Plate / Number Plate format as specified by the DVLA. Accepts both "Prefix" and "New" style. Allows only valid DVLA number combinations as not all are supported. Registration number must be exactly as is displayed on car, hence all letters must be in uppercase and a space seperating the two sets of characters.
This expression will be useful to check mobile
number of India. This expression will check
various types of number like number in local
format or international number separated by
hyphen(-) or not.