August 15, 2023

tGoogleDriveConnection – Docs for ESB 6.x

tGoogleDriveConnection

Opens 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.

    components-tgoogledriveconnection_getaccesstoken01.png

  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.

    components-tgoogledriveconnection_getaccesstoken02.png

  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.

    components-tgoogledriveconnection_getaccesstoken03.png

  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.

    components-tgoogledriveconnection_getaccesstoken04.png

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

  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.

    components-tgoogledriveconnection_getaccesstoken06.png

  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.

    components-tgoogledriveconnection_getaccesstoken07.png

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

    components-tgoogledriveconnection_getaccesstoken08.png

    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.
    components-tgoogledriveconnection_getaccesstoken09.png

tGoogleDriveConnection Standard properties

These properties are used to configure tGoogleDriveConnection running in the Standard Job framework.

The Standard
tGoogleDriveConnection component belongs to the Cloud family.

The component in this framework is generally available.

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

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

Usage rule

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.

Related scenario

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


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x