This guide describes a feature of the dbt Cloud Enterprise plan. If you’re interested in learning more about an Enterprise plan, contact us at email@example.com.
dbt Cloud supports OAuth authentication with BigQuery. When BigQuery OAuth is enabled, users can interact with the BigQuery warehouse as individual users, rather than leveraging a shared service level authentication.
Some Pre-Work Required
To enable BigQuery OAuth, you will need a Client ID & Secret for authentication with BigQuery to manage the OAuth connection between dbt Cloud and BigQuery.
In the BigQuery console you'll want to navigate to the Credentials page:
There you'll see your existing Keys, Client IDs and Service Accounts - you'll want to click the "Create Credentials" button at the top and follow the steps, like this:
For the fields we recommend the following:
|Application type||Web application|
|Authorized Redirect URIs|
If you're using a deployment other than the standard dbt Cloud multi-tenant, you'll need to replace
cloud.getdbt.com with the hostname of
your cloud instance here!
Then, click the blue Create button, which will display your Client ID and Client Secret, with handy clipboard buttons for copying into other screens, which is exactly what we're about to do. These values will continue to be available in your Credentials screen in perpetuity, this is not the only chance you have to access them.
Back in dbt Cloud, you'll want to navigate to your Connection page for BigQuery. There you'll be able to click the Edit button in the top corner to enable writing into the OAuth 2.0 Settings boxes near the bottom.
With Editing enabled, you can copy paste the Client ID and the Client Secret you created in BigQuery into their respective boxes, and return to the top of the page, to Save your new OAuth Credentials.