Connect to Google BigQuery using a Service Account

<aside> 💡 A service account enables Glazed to automatically validate that the events you create on the Glazed App are correctly arriving to your data warehouse.

This is a read-only service and we will only store the last timestamp for each event (i.e. “last seen) and the aggregated last 30-day volume (total number of clicks).

</aside>

Steps

  1. Open the Google Cloud Console and select your project.

  2. Navigate to the "IAM & Admin" section in the left sidebar.

    Screenshot 2023-07-28 at 16.14.49.png

  3. Click on "Service Accounts" and then on "Create Service Account".

    Screenshot 2023-07-28 at 16.13.05.png

  4. Choose a name (e.g. Glazed Analytics) and description for your service account and click on "Create and Continue".

    Screenshot 2023-07-28 at 16.30.38.png

  5. Under "Role", select "BigQuery" and then "BigQuery Data Viewer" and "BigQuery Job User".

  6. Click on "Done".

    Screenshot 2023-07-28 at 16.32.05.png

  7. Click on the vertical dots on the right of your service account and select "Manage Keys".

    Screenshot 2023-07-28 at 16.36.19.png

  8. Click on “Add Key” and then “Create new key”.

    Screenshot 2023-07-28 at 16.37.17.png

  9. Choose "JSON" as the key type and click on "Create".

    Screenshot 2023-07-28 at 16.38.15.png

  10. Save the JSON file to a secure location on your local machine.

🥳 You have now created a Google BigQuery service account with Data Viewer and Job User roles and downloaded the API key file. After completing the connection process Glazed can use this account to access BigQuery through the API.