Skip to content

Commit

Permalink
Splitting tabs up (#4302)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Splitting up tabs into separate examples to simplify discovery. See
feedback on #3121

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [x] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."
  • Loading branch information
matthewshaver authored Oct 19, 2023
2 parents b4fa853 + 2b56e4e commit a83093a
Showing 1 changed file with 28 additions and 40 deletions.
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_SECRET
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
```

</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

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

0 comments on commit a83093a

Please sign in to comment.