Using a Google Service Account
You can configure the connector to authenticate the connection with a Google service account. The service account can handle the authentication process so that no user input is required.
You must provide a Google service account email address and the full path to a private key file for the service account. You can download the private key file from the Google API console web page. For more information about OAuth authentication using a service account, see "Using OAuth 2.0 for Server to Server Applications" in the Google Identity Platform documentation: https://developers.google.com/identity/protocols/OAuth2ServiceAccount.
To configure service account authentication:
- Set the
OAuthType
property to0
. - Set the
ProjectID
property to the name of your BigQuery project. - Set the
OAuthServiceAcctEmail
property to your Google service account email address. - Set the
OAuthPvtKeyPath
property to the full path to the key file that is used to authenticate the service account email address. This parameter supports keys in.pl2
or.json
format. Alternatively, you can setOAuthPvtKey
to the full path of a service key file, or a raw JSON object.
For example, the following connection URL authenticates the connection using a service account:
jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;
ProjectId=MyBigQueryProject;OAuthType=0;
OAuthServiceAcctEmail=bqtest1@data-driver-testing.iam.gserviceaccount.com;
OAuthPvtKeyPath=C:\SecureFiles\ServiceKeyFile.p12;