# tGoogleDrivePut

Uploads data from a data flow or a local file to Google Drive.

## tGoogleDrivePut Standard properties

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

The Standard tGoogleDrivePut component belongs to the Cloud family.

The component in this framework is available in all Talend products.

## Basic settings

| Properties | Description |
| --- | --- |
| Property Type | Select the way the connection details<br>will be set.<br><br><ul> <li> <p> <span>Built-In</span>: The connection details will be set                                locally for this component. You need to specify the values for all                                related connection properties manually.</p> </li> <li> <p> <span>Repository</span>: The connection details stored                                centrally in <span><span>Repository</span><abbr> &gt; </abbr><span>Metadata</span></span> will be reused by this component. </p> <p>You need to click                                the <span>[...]</span> button next to it and in the pop-up                                    <span>Repository Content</span> dialog box, select the                                connection details to be reused, and all related connection                                properties will be automatically filled in.</p> </li> </ul><br><br>This property is not available when other connection component is selected from<br>the Connection Component dropdown list. |
| Component list | Select the component that opens the database connection to be reused by this<br>component. |
| Application Name | The application name required by Google Drive to get access to<br>its APIs. |
| OAuth Method | Select an OAuth method<br>used to access Google Drive from the drop-down list.<br><br><ul> <li> <p> <span>Installed Application (Id                                  &amp; Secret)</span>: uses the client ID and client secret                              created through Google API Console to access Google Drive. For more                              information about this method, see <a href="https://developers.google.com/identity/protocols/OAuth2#installed" target="_blank">Google Identity Platform &gt;                                  Installed applications </a>.</p> </li> <li> <p> <span>Installed Application                                  (JSON)</span>: uses the client secret JSON file that is                              created through Google API Console and contains the client ID,                              client secret, and other OAuth 2.0 parameters to access Google                              Drive.</p> </li> <li> <p> <span>Service                                  Account</span>: uses a service account JSON file created                              through Google API Console to access Google Drive. For more                              information about this method, see <a href="https://developers.google.com/identity/protocols/OAuth2#serviceaccount" target="_blank">Google Identity Platform &gt;                                  Service accounts</a>.</p> </li> </ul><br><br>For more information about how to access Google Drive using each method, see<br>[OAuth methods for accessing Google<br>Drive](https://help.qlik.com/talend/r/en-US/8.0/components/google-drive/oauth-methods-for-accessing-google-drive). |
| Client ID and<br>Client Secret | The client ID and client secret.<br><br>These two properties are available only when Installed Application (Id & Secret) is<br>selected from the OAuth Method<br>drop-down list. |
| Client Secret JSON | The path to the client secret JSON file.<br><br>This property is available only when Installed Application (JSON) is selected<br>from the OAuth Method drop-down<br>list. |
| Service Account<br>JSON | The path to the service account JSON file.<br><br>This property is available only when Service Account is selected from the<br>OAuth Method drop-down list. |
| Use Proxy | Select this check box when you are working behind a proxy.<br>With this check box selected, you need to specify the value for the<br>following parameters:<br><br><ul> <li> <p> <span>Host</span>: The IP                                address of the HTTP proxy server.</p> </li> <li> <p> <span>Port</span>: The port                                number of the HTTP proxy server.</p> </li> </ul> |
| Use SSL | Select this check box if an SSL connection is used to access<br>Google Drive. With this check box selected, you need to specify the value<br>for the following parameters:<br><br><ul> <li> <p> <span>Algorithm</span>: The                                name of the SSL cryptography algorithm.</p> </li> <li> <p> <span>Keystore File</span>:                                The path to the certificate TrustStore file that contains the list                                of certificates the client trusts.</p> </li> <li> <p> <span>Password</span>: The                                password used to check the integrity of the TrustStore data.</p> </li> </ul> |
| File Name | The name for the file after being uploaded. |
| Destination Folder | The name or ID of the folder in which uploaded data will be<br>stored. |
| Access Method | Select the method by which the destination folder is specified, either<br>by Name or by Id. |
| Replace if Existing | Select this check box to overwrite any existing file with the<br>newly uploaded one. |
| Upload Mode | Select one of the following upload modes from the drop-down list:<br><br><ul> <li> <p> <span>Upload Incoming content as File</span>: Select this                           option to upload data from an input flow of the preceding component.</p> </li> <li> <p> <span>Upload Local File</span>: Select this option to upload                           data from a local file. In the <span>File</span> field                           displayed, specify the path to the file to be uploaded.</p> </li> <li> <p> <span>Expose As OutputStream</span>: Select this option to                           expose output stream of this component, which can be used by other                           components to write the file content. For example, you can use the                              <span>Use Output Stream</span> feature of the                              <span>tFileOutputDelimited</span> component to feed a given                              <span>tGoogleDrivePut</span>'s exposed output stream. For                           more information, see <a href="https://help.qlik.com/talend/r/en-US/8.0/components/delimited/tfileoutputdelimited">tFileOutputDelimited</a>.</p> </li> </ul> |
| Schema and Edit schema | A schema is a row description, and<br>it defines the fields to be processed and passed on to the next component.<br><br>The schema of this component is read-only. You can click the<br>[...] button next to Edit schema to view the predefined schema which<br>contains the following fields:<br><br><ul> <li> <p> <span>content</span>: The content of the uploaded data.</p> </li> <li> <p> <span>parentFolderId</span>: The ID of the parent folder.</p> </li> <li> <p> <span>fileId</span>: The ID of the file.</p> </li> </ul> |

## Advanced settings

| Properties | Description |
| --- | --- |
| DataStore Path | The path to<br>the credential file that stores the refresh token.<br><br>Information noteNote: When<br>your client ID, client secret, or any other configuration related to the<br>Installed Application authentication changes, you need to delete this<br>credential file manually before running your Job again.<br><br>This property is<br>available only when Installed Application (Id<br>& Secret) or Installed<br>Application (JSON) is selected from the OAuth Method drop-down list. |
| Read Timeout | Enter the read timeout value in seconds. An exception will<br>occur if the timeout expires before there is data available for read. The<br>default value is 30 and 0 means an<br>infinite time out. This option is available if the component does not use an<br>existing connection. |
| Include shared folders/files | Select this check box to take into account files and folders that have been<br>shared with you. |
| Include shared drives | Select this check box to take into account drives that have been shared with<br>you.<br><br>It is recommended to use the by Id Access Method in<br>Basic settings when you select this check box, as<br>using the by Name Access Method can affect<br>performance. |
| Corpora type | Select a type of Corpora to narrow the scope of file and folder searches:<br><br><ul> <li><span>User</span> to query files that you have accessed,                          including both shared drive and My Drive files.</li> <li><span>Drive</span> to query all items in the specified                          shared drive. Specify the drive ID in the <span>Drive                              ID</span> field.</li> <li><span>Domain</span> to query files that are shared to the                          domain, including both shared drive and My Drive files.</li> <li><span>All drives</span> to query files that you have                          accessed and all shared drives in which you are a member. This                          corpora type can affect performance as it has a broad scope.</li> </ul><br><br><br>By default, User is the selected value.<br><br>This property is available only when the Include shared<br>drives check box is selected. |
| tStatCatcher Statistics | Select this checkbox to gather the Job processing metadata at the Job level<br>as well as at each component level. |

## Global Variables

| Variables | Description |
| --- | --- |
| ERROR\_MESSAGE | The error message generated by the component when an error<br>occurs. This is an After variable and it returns a string. |
| PARENT\_FOLDER\_ID | The ID of the parent folder. This is an After variable and<br>it returns a string. |
| FILE\_ID | The ID of the file. This is an After variable and it returns<br>a string. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component can be used as a standalone component to upload a local file to Google<br>Drive or an end component to upload data from an input flow of the<br>preceding component to Google Drive. |

**Related concepts**

* [Managing files with Google Drive](https://help.qlik.com/talend/en-US/components/8.0/google-drive/tgoogledriveput-tgoogledriveconnection-tfileinputraw-managing-files-with-google-drive-standard-component-this)