In the Dataset field of the
Component view, enter the dataset you need to transfer data
in. In this scenario, it is documentation.
This dataset must exist in BigQuery. The following figure shows the dataset used by this scenario.
- In the Table field, enter the name of the table you need to write data in, for example, UScustomer.
- In the Action on data field, select the action. In this example, select Truncate to empty the contents, if there are any, of target table and to repopulate it with the transferred data.
In the Authentication area, add the authentication
information. In most cases, the Service account mode is more
straight-forward and easy to handle.
Authentication mode Description Service account Authenticate using a Google account that is associated with your Google Cloud Platform project.
When selecting this mode, the Service account credentials file field is displayed. In this field, enter the path to the credentials file created for the service account to be used. This file must be stored in the machine in which your Talend Job is actually launched and executed.
For further information about how to create a Google service account and obtain the credentials file, see Getting Started with Authentication from the Google documentation.
OAuth 2.0 Authenticate the access using OAuth credentials. When selecting this mode, the parameters to be defined in the Basic settings view are Client ID, Client secret and Authorization code.
- Navigate to the Google APIs Console in your web browser to access the Google project hosting the BigQuery and the Cloud Storage services you need to use.
- Click the API Access tab to open its view.
- In the Component view of the Studio, paste Client
ID, Client secret and Project ID from the API Access tab view to the
corresponding fields, respectively.
In the Advanced settings tab, see the file path in the token properties File Name field. The Studio automatically generates this file during the first successful login and stores all future successful logins in it.
- In the Run view of the Studio, click Run to execute this Job. The execution will pause at a given moment to print out in the console the URL address used to get the authorization code.
- Navigate to this address in your web browser and copy the authorization code displayed.
- In the Component view of tBigQueryOutput, paste the authorization code in the Authorization Code field.
If you have been using the OAuth 2.0 authentication mode, in
the Action on data field, select the action to be performed on
your data. In this example, select Truncate to empty the
contents, if there are any, of target table and to repopulate it with the transferred
data. If your are using Service account, ignore this
If the table to be used does not exist in BigQuery, select Create the table if it doesn't exist.