Skip to content

Commit

Permalink
Merge branch 'current' into test-vale
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Jul 23, 2024
2 parents 846be6f + 9c50749 commit bf108aa
Show file tree
Hide file tree
Showing 34 changed files with 730 additions and 97 deletions.
8 changes: 3 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# Anything unmatched by selectors below
* @dbt-labs/product-docs

# The blog
/website/blog @KiraFuruichi


# Adapter & Package Development Docs
/website/docs/docs/supported-data-platforms.md @dbt-labs/product-docs @dataders
/website/docs/reference/warehouse-setups @dbt-labs/product-docs @dataders
Expand All @@ -17,4 +13,6 @@
/website/docs/guides/building-packages @dbt-labs/product-docs @amychen1776 @dataders @dbeatty10
/website/docs/guides/creating-new-materializations @dbt-labs/product-docs @dataders @dbeatty10


# Require approval from the Multicell team when making
# changes to the public facing migration documentation.
/website/docs/docs/cloud/migration.md @dbt-labs/dev-multicell
2 changes: 1 addition & 1 deletion website/docs/best-practices/best-practice-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This page contains the collective wisdom of experienced users of dbt on how to b
## Best practice workflows

### Version control your dbt project
All dbt projects should be managed in version control. Git branches should be created to manage development of new features and bug fixes. All code changes should be reviewed by a colleague (or yourself) in a Pull Request prior to merging into `master`.
All dbt projects should be managed in version control. Git branches should be created to manage development of new features and bug fixes. All code changes should be reviewed by a colleague (or yourself) in a Pull Request prior to merging into your production branch, such as `main`.

:::info Git guide

Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/build/join-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ semantic_models:
- name: user_id
type: primary
- name: country_id
type: Unique
type: unique
dimensions:
- name: signup_date
type: time
Expand Down
39 changes: 15 additions & 24 deletions website/docs/docs/cloud-integrations/semantic-layer/gsheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,24 @@ queryBuilder="/img/docs/dbt-cloud/semantic-layer/gsheets-query-builder.jpg"

## Using saved selections

<p><span>Saved selections allow you to save the inputs you've created in the {props.type} <strong>Query Builder</strong> and easily access them again so you don't have to continuously build common queries from scratch. To create a saved selection:</span></p>
Saved selections allow you to save inputs in the **Query Builder** to easily access them again so you don't have to continuously build common queries from scratch. To create a saved selection:

<ol>
<li>Run a <span>query in the {props.type} <strong>Query Builder</strong>.</span></li>
<li>Save the selection by selecting the arrow next to the <strong>Query</strong> button and then select <strong>Query & Save Selection</strong>.</li>
<li>The application saves these selections, allowing you to view and edit them from the hamburger menu under <strong>Saved Selections</strong>.</li>
</ol>
- Run a query in the **Query Builder**.
- Save the selection by selecting the arrow next to the **Query** button and then select **Query & Save Selection**.
- The application saves these selections, allowing you to view and edit them from the hamburger menu under **Saved Selections**.

<Lightbox src="/img/docs/dbt-cloud/semantic-layer/gsheets-query-builder.jpg" width="25%" title="Query and save selections in the Query Builder using the arrow next to the Query button." />

<p>You can also make these selections private or public:</p>
You can also make these selections private or public:

<ul>
<li><strong>Public selections</strong> mean your inputs are available in the menu to everyone on the sheet.</li>
<li><strong>Private selections</strong> mean your inputs are only visible to you. Note that anyone added to the sheet can still see the data from these private selections, but they won't be able to interact with the selection in the menu or benefit from the automatic refresh.</li>
</ul>
- **Public selections** mean your inputs are available in the menu to everyone on the sheet.
- **Private selections** mean your inputs are only visible to you. Note that anyone added to the sheet can still see the data from these private selections, but they won't be able to interact with the selection in the menu or benefit from the automatic refresh.

### Refreshing selections

<p>Set your saved selections to automatically refresh every time you load the addon. You can do this by selecting <strong>Refresh on Load</strong> when creating the saved selection. When you access the addon and have saved selections that should refresh, you'll see "Loading..." in the cells that are refreshing.</p>
Set your saved selections to automatically refresh every time you load the addon. You can do this by selecting **Refresh on Load** when creating the saved selection. When you access the addon and have saved selections that should refresh, you'll see "Loading..." in the cells that are refreshing.

<p>Public saved selections will refresh for anyone who edits the sheet while private selections will only update for the user who created it.</p>
Public saved selections will refresh for anyone who edits the sheet while private selections will only update for the user who created it.

:::tip What's the difference between saved selections and saved queries?

Expand All @@ -81,17 +77,12 @@ queryBuilder="/img/docs/dbt-cloud/semantic-layer/gsheets-query-builder.jpg"

## Using saved queries

<p>Access <a href="/docs/build/saved-queries">saved queries</a>, powered by MetricFlow, in {props.type} to quickly get results from pre-defined sets of data. To access the saved queries in {props.type}:</p>

<ol>
<li>Open the hamburger menu in {props.type}.</li>
<li>Navigate to <strong>Saved Queries</strong> to access the ones available to you.</li>
<li>You can also select <strong>Build Selection</strong>, which allows you to explore the existing query. This won't change the original query defined in the code.
<ul>
<li>If you use a <code>WHERE</code> filter in a saved query, {props.type} displays the advanced syntax for this filter.</li>
</ul>
</li>
</ol>
Access <a href="/docs/build/saved-queries">saved queries</a>, powered by MetricFlow, to quickly get results from pre-defined sets of data. To access the saved queries in your integration:

- Open the hamburger menu in Google Sheets.
- Navigate to **Saved Queries** to access the ones available to you.
- You can also select **Build Selection**, which allows you to explore the existing query. This won't change the original query defined in the code.
- If you use a [`where` filter](/docs/build/saved-queries#where-clause) in a saved query, Google Sheets displays the advanced syntax for this filter.

**Limited use policy disclosure**

Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/cloud/git/setup-azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Once you connect your Microsoft Entra ID app and Azure DevOps, you need to provi
4. Complete the form:
- **Azure DevOps Organization:** Must match the name of your Azure DevOps organization exactly. Do not include the `dev.azure.com/` prefix in this field. ✅ Use `my-devops-org` ❌ Avoid `dev.azure.com/my-devops-org`
- **Application (client) ID:** Found in the Microsoft Entra ID app.
- **Client Secrets:** Copy the **Value** field in the Microsoft Entra ID app client secrets and paste it in the **Client Secret** field in dbt Cloud. Entra ID admins are responsible for the Entra ID app secret expiration and dbt Admins should not the expiration date for rotation.
- **Client Secrets:** Copy the **Value** field in the Microsoft Entra ID app client secrets and paste it in the **Client Secret** field in dbt Cloud. Entra ID admins are responsible for the Entra ID app secret expiration and dbt Admins should note the expiration date for rotation.
- **Directory(tenant) ID:** Found in the Microsoft Entra ID app.
<Lightbox src="/img/docs/dbt-cloud/connecting-azure-devops/AzureDevopsAppdbtCloud.gif" title="Adding a Microsoft Entra ID app to dbt Cloud"/>

Expand Down
208 changes: 203 additions & 5 deletions website/docs/docs/core/connect-data-platform/snowflake-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import SetUpPages from '/snippets/_setup-pages-intro.md';

Snowflake can be configured using basic user/password authentication as shown below.

<VersionBlock lastVersion="1.8">

<File name='~/.dbt/profiles.yml'>

```yaml
Expand Down Expand Up @@ -56,7 +58,7 @@ my-snowflake-db:
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: False # default: false
reuse_connections: False
```
</File>
Expand Down Expand Up @@ -91,9 +93,80 @@ my-snowflake-db:
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: False # default: false
reuse_connections: False
```
</VersionBlock>
<VersionBlock firstVersion="1.9">
<File name='~/.dbt/profiles.yml'>
```yaml
my-snowflake-db:
target: dev
outputs:
dev:
type: snowflake
account: [account id]

# User/password auth
user: [username]
password: [password]

role: [user role]
database: [database name]
warehouse: [warehouse name]
schema: [dbt schema]
threads: [1 or more]
client_session_keep_alive: False
query_tag: [anything]

# optional
connect_retries: 0 # default 0
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: True # default: True if client_session_keep_alive is False, otherwise None
```
</File>
### User / Password + DUO MFA authentication
Snowflake integrates the DUO Mobile app to add 2-Factor authentication to basic user/password as seen below.
```yaml
my-snowflake-db:
target: dev
outputs:
dev:
type: snowflake
account: [account id]

# User/password auth
user: [username]
password: [password]
authenticator: username_password_mfa

role: [user role]
database: [database name]
warehouse: [warehouse name]
schema: [dbt schema]
threads: [1 or more]
client_session_keep_alive: False
query_tag: [anything]

# optional
connect_retries: 0 # default 0
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: True # default: True if client_session_keep_alive is False, otherwise None
```
</VersionBlock>
Along with adding the `authenticator` parameter, be sure to run `alter account set allow_client_mfa_caching = true;` in your Snowflake warehouse. Together, these will allow you to easily verify authentication with the DUO Mobile app (skipping this results in push notifications for every model built on every `dbt run`).

### Key pair authentication
Expand All @@ -102,6 +175,8 @@ To use key pair authentication, specify the `private_key_path` in your configura

Starting from [dbt version 1.7](/docs/dbt-versions/core-upgrade/upgrading-to-v1.7), dbt introduced the ability to specify a `private_key` directly as a string instead of a `private_key_path`. This `private_key` string can be in either Base64-encoded DER format, representing the key bytes, or in plain-text PEM format. Refer to [Snowflake documentation](https://docs.snowflake.com/en/user-guide/key-pair-auth) for more info on how they generate the key.

<VersionBlock lastVersion="1.8">

<File name='~/.dbt/profiles.yml'>

```yaml
Expand Down Expand Up @@ -131,7 +206,7 @@ my-snowflake-db:
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: False # default: false
reuse_connections: False
```

</File>
Expand Down Expand Up @@ -173,7 +248,7 @@ my-snowflake-db:
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: False # default: false
reuse_connections: False
```

</File>
Expand Down Expand Up @@ -211,14 +286,137 @@ my-snowflake-db:
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: False # default: false
reuse_connections: False
```

</File>

</TabItem>
</Tabs>

</VersionBlock>

<VersionBlock firstVersion="1.9">

<File name='~/.dbt/profiles.yml'>

```yaml
my-snowflake-db:
target: dev
outputs:
dev:
type: snowflake
account: [account id]
user: [username]
role: [user role]
# Keypair config
private_key_path: [path/to/private.key]
# or private_key instead of private_key_path
private_key_passphrase: [passphrase for the private key, if key is encrypted]
database: [database name]
warehouse: [warehouse name]
schema: [dbt schema]
threads: [1 or more]
client_session_keep_alive: False
query_tag: [anything]
# optional
connect_retries: 0 # default 0
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: True # default: True if client_session_keep_alive is False, otherwise None
```

</File>

### SSO Authentication

To use SSO authentication for Snowflake, omit a `password` and instead supply an `authenticator` config to your target.
`authenticator` can be one of 'externalbrowser' or a valid Okta URL.

Refer to the following tabs for more info and examples:

<Tabs>
<TabItem value="externalbrowser" label="externalbrowser">

<File name='~/.dbt/profiles.yml'>

```yaml
my-snowflake-db:
target: dev
outputs:
dev:
type: snowflake
account: [account id] # Snowflake <account_name>
user: [username] # Snowflake username
role: [user role] # Snowflake user role
# SSO config
authenticator: externalbrowser
database: [database name] # Snowflake database name
warehouse: [warehouse name] # Snowflake warehouse name
schema: [dbt schema]
threads: [between 1 and 8]
client_session_keep_alive: False
query_tag: [anything]
# optional
connect_retries: 0 # default 0
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: True # default: True if client_session_keep_alive is False, otherwise None
```

</File>

</TabItem>

<TabItem value="oktaurl" label="Okta URL">

<File name='~/.dbt/profiles.yml'>

```yaml
my-snowflake-db:
target: dev
outputs:
dev:
type: snowflake
account: [account id] # Snowflake <account_name>
user: [username] # Snowflake username
role: [user role] # Snowflake user role
# SSO config -- The three following fields are REQUIRED
authenticator: [Okta account URL]
username: [Okta username]
password: [Okta password]
database: [database name] # Snowflake database name
warehouse: [warehouse name] # Snowflake warehouse name
schema: [dbt schema]
threads: [between 1 and 8]
client_session_keep_alive: False
query_tag: [anything]
# optional
connect_retries: 0 # default 0
connect_timeout: 10 # default: 10
retry_on_database_errors: False # default: false
retry_all: False # default: false
reuse_connections: True # default: True if client_session_keep_alive is False, otherwise None
```

</File>

</TabItem>
</Tabs>

</VersionBlock>

**Note**: By default, every connection that dbt opens will require you to re-authenticate in a browser. The Snowflake connector package supports caching your session token, but it [currently only supports Windows and Mac OS](https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use.html#optional-using-connection-caching-to-minimize-the-number-of-prompts-for-authentication).

Refer to the [Snowflake docs](https://docs.snowflake.com/en/sql-reference/parameters.html#label-allow-id-token) for info on how to enable this feature in your account.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/docs/dbt-cloud-apis/sl-api-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ plan="dbt Cloud Team or Enterprise"
link="/docs/dbt-cloud-apis/sl-graphql"
icon="dbt-bit"/>

<Card
title="Python SDK (Preview)"
body="Use the Python SDK to interact with the dbt Semantic Layer using Python."
link="/docs/dbt-cloud-apis/sl-python"
icon="dbt-bit"/>

<Card
title="Semantic manifest"
body="Learn about the semantic manifest.json file and how you can use artifacts to gain insights about your Semantic Layer."
Expand Down
Loading

0 comments on commit bf108aa

Please sign in to comment.