Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting tabs up #4302

Merged
merged 9 commits into from
Oct 19, 2023
68 changes: 28 additions & 40 deletions website/docs/docs/core/connect-data-platform/bigquery-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ my-bigquery-db:
dev:
type: bigquery
method: oauth
project: [GCP project id]
dataset: [the name of your dbt dataset] # You can also use "schema" here
threads: [1 or more]
[<optional_config>](#optional-configurations): <value>
project: GCP_PROJECT_ID
dataset: DBT_DATASET_NAME # You can also use "schema" here
threads: 4 # Must be a value of 1 or greater
[OPTIONAL_CONFIG](#optional-configurations): VALUE
```

</File>
Expand All @@ -90,14 +90,7 @@ If you do not specify a `project`/`database` and are using the `oauth` method, d

See [docs](https://developers.google.com/identity/protocols/oauth2) on using OAuth 2.0 to access Google APIs.

<Tabs
defaultValue="refresh"
values={[
{label: 'Refresh token', value: 'refresh'},
{label: 'Temporary token', value: 'temp'},
]}>

<TabItem value="refresh">
#### Refresh token

Using the refresh token and client information, dbt will mint new access tokens as necessary.

Expand All @@ -110,21 +103,19 @@ my-bigquery-db:
dev:
type: bigquery
method: oauth-secrets
project: [GCP project id]
dataset: [the name of your dbt dataset] # You can also use "schema" here
threads: [1 or more]
refresh_token: [token]
client_id: [client id]
client_secret: [client secret]
token_uri: [redirect URI]
[<optional_config>](#optional-configurations): <value>
project: GCP_PROJECT_ID
dataset: DBT_DATASET_NAME # You can also use "schema" here
threads: 4 # Must be a value of 1 or greater
refresh_token: TOKEN
client_id: CLIENT_ID
client_secret: CLIENT_SECRETS
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
token_uri: REDIRECT_URI
[OPTIONAL_CONFIG](#optional-configurations): VALUE
```

</File>

</TabItem>

<TabItem value="temp">
#### Temporary token

dbt will use the one-time access token, no questions asked. This approach makes sense if you have an external deployment process that can mint new access tokens and update the profile file accordingly.

Expand All @@ -137,18 +128,15 @@ my-bigquery-db:
dev:
type: bigquery
method: oauth-secrets
project: [GCP project id]
dataset: [the name of your dbt dataset] # You can also use "schema" here
threads: [1 or more]
token: [temporary access token] # refreshed + updated by external process
[<optional_config>](#optional-configurations): <value>
project: GCP_PROJECT_ID
dataset: DBT_DATASET_NAME # You can also use "schema" here
threads: 4 # Must be a value of 1 or greater
token: TEMPORARY_ACCESS_TOKEN # refreshed + updated by external process
[OPTIONAL_CONFIG](#optional-configurations): VALUE
```

</File>

</TabItem>

</Tabs>

### Service Account File

Expand All @@ -161,11 +149,11 @@ my-bigquery-db:
dev:
type: bigquery
method: service-account
project: [GCP project id]
dataset: [the name of your dbt dataset]
threads: [1 or more]
keyfile: [/path/to/bigquery/keyfile.json]
[<optional_config>](#optional-configurations): <value>
project: GCP_PROJECT_ID
dataset: DBT_DATASET_NAME
threads: 4 # Must be a value of 1 or greater
keyfile: /PATH/TO/BIGQUERY/keyfile.json
[OPTIONAL_CONFIG](#optional-configurations): <value>
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
```

</File>
Expand All @@ -189,10 +177,10 @@ my-bigquery-db:
dev:
type: bigquery
method: service-account-json
project: [GCP project id]
dataset: [the name of your dbt dataset]
threads: [1 or more]
[<optional_config>](#optional-configurations): <value>
project: GCP_PROJECT_ID
dataset: DBT_DATASET_NAME
threads: 4 # Must be a value of 1 or greater
[OPTIONAL_CONFIG](#optional-configurations): <value>
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

# These fields come from the service account json keyfile
keyfile_json:
Expand Down
Loading