Google Cloud BigQuery account details

To establish a connection to Google Cloud BigQuery, you must add an account that defines the account details to connect with. You can define these details by creating a configuration object in the App Connect Dashboard, the Red Hat® OpenShift® web console or CLI, or the Kubernetes CLI.

Account parameters

You can define one or more accounts for Google Cloud BigQuery.

For each account that you require, you can specify a new set of account details in any of the following ways:

  • If you are using the App Connect Dashboard, either complete the Account details fields in the Create configuration panel, or specify the account parameters in an accounts.yaml file before importing it into the Create configuration panel. For more information, see Accounts type.
  • If you are using the Red Hat OpenShift web console or CLI, or the Kubernetes CLI, specify the account parameters in an accounts.yaml file, and then use this configuration file to create a configuration object. For more information, see Creating the file for a configuration object of type Accounts.

The set of required and optional Account fields or parameters are listed in the following table.

For information about locating the values for these account parameters, see Locating the values for the account parameters.

Field Parameter Values Condition Description

Account name

name

User defined

Required

The name of a Google Cloud BigQuery account that is used in the exported flow.

Project ID

projectId

User defined

Required

The ID of your Google Cloud project.

Dataset ID

datasetId

User defined

Required

The ID (unique name) of the dataset containing the tables and views that you want to work with in the project. To work with tables or views from another dataset, you'll need to create a different account using that specific dataset ID.

Client email

clientEmail

User defined

Required

Also known as the service account ID. For example, abc-222@bigqueryproject-22xxx.iam.gserviceaccount.com.

Private key

privateKey

User defined

Required

A key used to establish the identity of the service account.

Locating the values for the account parameters

To obtain connection values for Google Cloud BigQuery, complete the following steps.

  1. Log in to the Google Cloud Console.
  2. Select an existing project that you want to work with, or create a project:
    1. Click the drop-down list in the page banner to open the "Select a project" panel.
    2. To select an existing project, click the project name in the Name column. To create a project, click NEW PROJECT, complete the fields, and click CREATE.
    Select or create a project from the drop-down list in the Google Cloud Console banner
  3. To obtain the project ID, client email, and private key, complete the steps for either of the following options:
      1. Ensure that your project is selected in the page banner.
      2. Open the navigation menu Navigation menu and click IAM & Admin > Service Accounts.
      3. If no service account currently exists in the project, click CREATE SERVICE ACCOUNT to create a service account that can be used to make authorized API calls. Grant the service account access to resources in your project by selecting one or more roles; for example, Owner. Then click DONE.
      4. Click the Actions icon Actions icon for the service account (existing or newly created) that you want to work with and then click Manage keys.
      5. From the KEYS tab, click ADD KEY > Create new key to generate a key.
      6. Select JSON as the key type and then click Create. You’ll find the values you require for the project ID, client email, and private key in the JSON file that's downloaded to your browser's default location.
      7. Save the downloaded JSON file to a safe location because you won't be able to download it again from the Google Cloud Console.
      Service accounts page in the Google Cloud Console
      1. Ensure that your project is selected in the page banner.
      2. From the Dashboard tab, locate the Getting Started tile and click Explore and enable APIs.
        Selecting a project and the "Explore and enable APIs" option
      3. Click ENABLE APIS AND SERVICES.
      4. Search for and select BiqQuery API, then click MANAGE (or click ENABLE if not yet enabled).
      5. Click Credentials and then click Credentials in APIs & Services.
      6. Click CREATE CREDENTIALS > Service account, and follow the on-screen instructions to create a service account. Grant the service account access to resources in your project by selecting one or more roles; for example, Owner. Then click DONE.
      7. When the service account appears on the Credentials page, click the Email name for the service account or click the Edit service account icon.
      8. From the KEYS tab, click ADD KEY > Create new key to generate a key.
      9. Select JSON as the key type and then click Create. You’ll find the values you require for the project ID, client email, and private key in the JSON file that's downloaded to your browser's default location.
      10. Save the downloaded JSON file to a safe location because you won't be able to download it again from the Google Cloud Console.
  4. To obtain the dataset ID, complete the following steps to create a dataset with a unique ID:
    1. Ensure that your project is selected in the page banner.
    2. Open the navigation menu Navigation menu and click BigQuery.
    3. In the Explorer pane, click the View actions icon Actions icon and then click Create dataset.
      Accessing the "Create dataset" option
    4. Complete the fields in the "Create dataset" panel and then click CREATE DATASET. Make a note of the dataset ID that you specified.

Example

Remember: An accounts.yaml file that defines one or more accounts must always begin with the following line:
accounts:

  googlebigquery:
    - name: Account 1
      credentials:
        projectId: gentle-platform-337722
        datasetId: googlebq_dataset
        clientEmail: googlebq-sa@gentle-platform-337722.iam.gserviceaccount.com
        privateKey: >-
          -----BEGIN PRIVATE KEY-----\nPRIVATEkeyValue\nINaVeryLongStringOfCharacters\n-----END PRIVATE KEY-----\n
      endpoint: {}