Prepping BigQuery
You’ll first need a service account JSON file that Avenue can use to access your BigQuery dataset. To create the service account JSON file, follow Google’s documentation on setting up a service account for your BigQuery dataset. Here’s the basic flow:
From your Google Cloud Platform project console, open the main sidebar menu on the left, go to the IAM & Admin section, and select Service account. The console will list existing service accounts, if any. At the top of the screen, click on
+ CREATE SERVICE ACCOUNT
.Fill out the service account details. Name the service account, and add a description (the service account ID will populate once you add a name). Then click the Create button.
Grant the service account access to this project. You’ll need to add roles to the service account so that Avenue will have permission to view and run queries against your dataset.
Make sure you add the following roles to the service account:
BigQuery Data Viewer
BigQuery Metadata Viewer
BigQuery Job User (distinct from BigQuery User)
Create key. Once you have assigned roles to the service account, click on the Create Key button, and select JSON for the key type. The JSON file will download to your computer. You can only download the key once. If you delete the key, you’ll need to create another service account with the same roles.
Configuring Data Source in Avenue
Select Data Sources
and click + Add New Connection
.
Select BigQuery from the Database options and then enter your previously collected credentials.
Once you add your credentials select Connect Database
💡Please allow Avenue to connect to your database by allow-listing our IP addresses: 3.217.246.91, 52.55.137.145
Connecting a monitor to your BigQuery data
Once you have connected your BigQuery instance, you can use it in your monitors by heading to the Select the Data
section of the monitor create or edit form and select it from the database dropdown options.