Purpose

Specifies the private key required to authenticate to a Google BigQuery instance when service account authentication is enabled (AuthenticationMethod=serviceaccount). The private key is obtained from the private key file. The private key file can be downloaded from Google Cloud Platform (GCP) Console.

To learn more about service accounts and service account private keys, refer to Google documentation.

Valid Values

string

where:

string
is the value of the private_key property in the private key file downloaded from the Google Cloud Platform (GCP) Console. Surrounding quotation marks should be omitted when specifying the value.

Notes

  • Either ServiceAccountKeyContent or ServiceAccountPrivateKey may be used to configure service account authentication. ServiceAccountKeyContent specifies the private key itself, whereas ServiceAccountPrivateKey specifies the full path to the .json or .p12 file that contains the private key. When ServiceAccountKeyContent is used, the specified private key is used to authenticate the user with the database. When ServiceAccountPrivateKey is used, the driver extracts the private key value from the specified file and uses it to authenticate the user to the database. If you do not want to persist the private key file in your environment, you should use the ServiceAccountKeyContent property. If ServiceAccountKeyContent and ServiceAccountPrivateKey are both specified, the ServiceAccountKeyContent property will be used to connect to Google BigQuery.

Example

As shown in this example, surrounding quotation marks should be omitted when specifying the value.

ServiceAccountKeyContent=NJJXZexIHJFGYBgkqhkiG9w0BAQnWRwiHANpf3MC1pVRqhtTE5tSpxZeQnICG
4zp087Eidn4qc66udg8KAHknyqFdj7b\n+MgxMFPAvJ59cylHFaHA4pGmeGfVqzYub6LEs9aN/751jmZqcuAYp
5nXRF1EvJPN\nsDuJGLvuuDBZW0iux0liEHmcQVBBKwIx8t+EQxePGTiLsBoCdzOUsi4UWWv\nASqfdP/kSX+N

Data Source Method

setServiceAccountKeyContent

Default

None

Data Type

String

See also

Configuring service account authentication

ServiceAccountEmail

ServiceAccountPrivateKey

Service account properties