BigQuery prerequisites

To use a ThoughtSpot connection to query your GBQ database, you must create a custom role with specific permissions and then assign it to your service account.

Create a custom role

To create a custom role in BigQuery, do the following:

  1. Navigate to console.cloud.google.com, sign in, and select your project.

  2. Hover over IAM & admin.

  3. Select Roles.

  4. Select +CREATE ROLE.

  5. On the Create Role page, do the following:

    • Enter a title (or keep the existing one).

    • (Optional) Enter a description.

    • Create an ID (or keep the existing one).

    • Select a Role launch stage.

    • Select +ADD PERMISSIONS.

  6. In the Add permissions window, select ONLY the following permissions:

    • bigquery.config.get

    • bigquery.datasets.get

    • bigquery.datasets.getIamPolicy

    • bigquery.jobs.create

    • bigquery.jobs.list

    • bigquery.readsessions.create

    • bigquery.savedqueries.get

    • bigquery.savedqueries.list

    • bigquery.tables.get

    • bigquery.tables.getData

    • bigquery.tables.list

    • resourcemanager.projects.get

      Select only the permissions specified
      Permissions 11 and 12
  7. Select ADD.

  8. Select CREATE.

Set up service account

You may already have a service account for GBQ with the proper permissions in place. If not, follow these steps to create a service account.

  1. Navigate to console.cloud.google.com, sign in, and select your project.

  2. Open the navigation menu in the upper left, if it is not already open.

  3. Hover over IAM & Admin.

  4. Select Service Accounts.

    Click Service Accounts
  5. Select + CREATE SERVICE ACCOUNT from the top menu.

  6. Specify a name, and add an optional description.

  7. Select CREATE.

    Create your service account
  8. On the Service account permissions page, click Select a role, choose Custom, and select the custom role you created in Create a custom role.

  9. Select CONTINUE.

  10. On the Create service account page, select + CREATE KEY.

  11. For Key type, choose JSON.

  12. Select CREATE. The key downloads to your computer.

    When the download is complete, the message: "Private key saved to your computer" appears.

  13. Make note of the name of the filename, so you can find it on your computer, and then select CLOSE.

  14. When you are ready to add a connection to BigQuery in ThoughtSpot, open the private key file in a text editor, and copy the entire contents of the file.

  15. In the connection details page of your BigQuery connection in ThoughtSpot, paste this key into the Service account field.

    For details on how to add a connection to BigQuery in ThoughtSpot, see Add a BigQuery connection.

Share dataset

To make your dataset available for your Google BigQuery connection in ThoughtSpot, you must share it with your service account in Google BigQuery in an owner role.

  1. Navigate to console.cloud.google.com, sign in, and select your project.

  2. Open the navigation menu in the upper left, if it is not already open.

  3. Scroll down in the navigation menu into the BIG DATA section, and select BigQuery.

    Your project should be listed on the left side of the page under the search box.

  4. Select your project to reveal its available datasets.

  5. Select the dataset that you want to share.

  6. Select SHARE DATASET.

  7. Select Owner to reveal the complete list of project owners.

  8. In the Add members box, enter the member email address of the service account you want to share the dataset with.

  9. Click Select a role, select Project  Owner, and choose Add.

  10. Select Done.