tGoogleDriveConnection - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Function

This component opens a connection to access a Google Drive account.

Purpose

This component allows you to open a Google Drive connection that can be reused by other Google Drive components.

Obtaining an access token for Google Drive

To use Google Drive API, you need first to obtain the access token by completing the following steps using Google Chrome:

  1. Go to the Google API Console and select an existing project or create a new one. In this example, we create a new project TalendProject.

  2. Go to the Library page and in the right panel, click Drive API and then click ENABLE to enable the Google Drive API that allows clients to access resources from Google Drive.

  3. Go to the Credentials page, click OAuth consent screen in the right panel and set a product name in the Product name shown to users field. In this example, it is TalendProduct. When done, click Save to save the change.

  4. Click Create credentials > OAuth client ID, and in the Create client ID page, create a new client ID TalendWebClient with Application type set to Web application and Authorized redirect URIs set to https://developers.google.com/oauthplayground.

    The created OAuth client ID and client secret will be used for obtaining the access token.

  5. Go to the Google Developers OAuth 2.0 Playground, click OAuth 2.0 Configuration and select Use your own OAuth credentials check box, enter the OAuth client ID and client secret you have already created in the OAuth Client ID and OAuth Client secret fields respectively.

  6. In OAuth 2.0 Playground Step 1, select the scope https://www.googleapis.com/auth/drive for the Google Drive API and click Authorize APIs, then click Allow to generate the authorization code.

  7. In OAuth 2.0 Playground Step 2, click Exchange authorization code for tokens to generate the OAuth access token.

    The OAuth access token is displayed on the right panel as shown in below figure. Note that the access token expires in every 3600 seconds. You can click Refresh access token in OAuth 2.0 Playground Step 2 to refresh it.

tGoogleDriveConnection properties

Component family

Cloud / Google Drive

 

Basic settings

Application Name

Enter the application name required by Google Drive to get access to its APIs.

 

Access Token

Enter the access token required by Google Drive to access a Google Drive account and operate it. For how to get the access token, see Obtaining an access token for Google Drive.

 

Use HTTP Proxy

Select this check box if you are working behind an HTTP proxy.

 

Proxy Host

Enter the IP address of the HTTP proxy server.

This field is available only when the Use HTTP Proxy check box is selected.

 

Proxy Port

Enter the port number of the HTTP proxy server.

This field is available only when the Use HTTP Proxy check box is selected.

 

Use SSL

Select this check box if an SSL connection is used to access Google Drive.

 

Algorithm

Enter the name of the SSL cryptography algorithm.

This field is available only when the Use SSL check box is selected.

 

TrustStore File

Browse to or enter the path to the certificate TrustStore file that contains the list of certificates the client trusts.

This field is available only when the Use SSL check box is selected.

 

Password

Enter the password used to check the integrity of the TrustStore data.

This field is available only when the Use SSL check box is selected.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at the Job level as well as at each component level.

Global Variables

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio User Guide.

Usage

This component is more commonly used with other Google Drive components. In a Job design, it is usually used to open a Google Drive connection that can be reused by other Google Drive components.

Limitation

n/a

Related scenario

For a related scenario, see Managing files with Google Drive.