Google BigQuery connection guide

Prev Next

This guide contains all permissions and requirements for connecting your Google BigQuery data to Supermetrics.

You can connect to data sources from the Data sources page on the Supermetrics Hub. On the Hub, you can also share an authentication link to connect to a data source you don't have direct access to.

After you connect to the data source on the Hub, you can use the data source connection in all available destinations.

Required permissions

There are 2 ways to authenticate Google BigQuery: with OAuth 2.0, or with a service account.

Permissions when connecting with OAuth 2.0

You need a Google account with access to view and manage tables in BigQuery in Google Cloud in order to connect.

Required Google Account permissions:

  • View and manage your tables, datasets, and jobs in Google BigQuery.

  • See the email address for your Google Account.

Permissions when connecting with a service account

  1. Create a service account:

    1. Create a service account and assign sufficient permissions for it, for example:

      1. roles/bigquery.user (project-level)

      2. roles/bigquery.dataViewer (dataset-level)

      Detailed instructions are available in Google’s documentation.

  2. Create and obtain a private JSON key for the service account:

    1. In the Google Cloud console, go to the Service accounts page.

    2. Go to Service accounts and select a project.

    3. Click the email address of the service account you want to create a key for.

    4. Click the Keys tab.

    5. Click the Add key drop-down menu, then select Create new key.

    6. Select JSON as the Key type and click Create.

    7. To authenticate the connector, use the following values from the JSON file:

      1. Private key: The complete string from - - - - - BEGIN PRIVATE KEY - - - - - to - - - - - END PRIVATE KEY - - - - -\n

      2. Key ID

      3. Client email

      For more details on creating keys, refer to Google’s documentation.

Before you start the authentication process

Obtain your table ID

  1. Identify the BigQuery table you wish to connect to in the Google Cloud console.

  2. In the left-hand Explorer section, click the three dots next to the table.

  3. Select Copy ID and save this for later.

Identify your date column

  1. Select your table in the Google Cloud console and open the Schema tab.

  2. Copy the field name of the column you want to use for date range filtering.

    Please note that your BigQuery table must have a DATE or DATETIME column to fetch data for specific date ranges.

Query types

If prompted, you need to select a query type to pull data.

  • Table: Fetch data from your table in BigQuery.

Connection instructions

When connecting to Google BigQuery using OAuth 2.0

  1. You need to be logged in with your Google Account.

  2. Select the Google BigQuery data source on the Supermetrics Hub or in the data destination.

  3. Insert the table ID.

  4. If prompted, choose to make this connection shared or private.

  5. Click Start.

  6. In your data destination, fill in the value for the Date column setting.

When connecting to Google BigQuery using a service account

  1. Select the Google BigQuery data source on the Supermetrics Hub or in the data destination.

  2. Insert the table ID, Private key, Key ID, and Client email.

  3. If prompted, choose to make this connection shared or private.

  4. Click Start.

  5. In your data destination, fill in the value for the Date column setting.

See detailed instructions on how to connect to a data source from the Supermetrics Hub.

You can also connect to Google BigQuery from these destinations:

More resources

How to reauthenticate a data source in Google Sheets, Looker Studio, Excel, or Power BI

How to reauthenticate a data source in data warehouse, API, or cloud storage platform

How to manage data source connections on the Supermetrics Hub