Skip to content

Commit

Permalink
Merge branch 'current' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders authored Sep 19, 2023
2 parents 7811057 + bf40649 commit 703b6f9
Show file tree
Hide file tree
Showing 32 changed files with 347 additions and 147 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ website/i18n/*
.netlify

.eslintcache

# Local Vercel folder
.vercel
5 changes: 4 additions & 1 deletion website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ yarn-error.log*
# feeds
/static/feeds/atom.xml
/static/feeds/rss.json
/static/feeds/rss.xml
/static/feeds/rss.xml

# Local Vercel folder
.vercel
5 changes: 5 additions & 0 deletions website/dbt-versions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
exports.versions = [
{
version: "1.7",
EOLDate: "2024-07-31",
isPrerelease: "true"
},
{
version: "1.6",
EOLDate: "2024-07-31",
Expand Down
6 changes: 6 additions & 0 deletions website/docs/docs/cloud/about-cloud/dbt-cloud-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ link="/docs/cloud/dbt-cloud-ide/develop-in-the-cloud"
body="View the history of your runs and the model timing dashboard to help identify where improvements can be made to the scheduled jobs."
link="/docs/deploy/run-visibility"
icon="pencil-paper"/>

<Card
title="dbt Explorer*"
body="Learn about dbt Explorer and how to interact with it to understand, improve, and leverage your data pipelines."
link="/docs/collaborate/explore-projects"
icon="pencil-paper"/>
</div> <br />

*These features are available on [selected plans](https://www.getdbt.com/pricing/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Additionally, you may configure the IdP attributes passed from your identity pro
| email | Unspecified | user.email | The user's email address |
| first_name | Unspecified | user.first_name | The user's first name |
| last_name | Unspecified | user.last_name | The user's last name |
| NameID (if applicable) | Unspecified | user.email | The user's email address |

dbt Cloud's [role-based access control](/docs/cloud/manage-access/about-user-access#role-based-access-control) relies
on group mappings from the IdP to assign dbt Cloud users to dbt Cloud groups. To
Expand Down
142 changes: 142 additions & 0 deletions website/docs/docs/collaborate/explore-projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
title: "Explore your dbt projects (beta)"
sidebar_label: "Explore dbt projects (beta)"
description: "Learn about dbt Explorer and how to interact with it to understand, improve, and leverage your data pipelines."
---

With dbt Explorer, you can view your project's [resources](/docs/build/projects) (such as models, tests, and metrics) and their <Term id="data-lineage">lineage</Term> to gain a better understanding of its latest production state. Navigate and manage your projects within dbt Cloud to help your data consumers discover and leverage your dbt resources.

To display the details about your [project state](/docs/dbt-cloud-apis/project-state), dbt Explorer utilizes the metadata provided through the [Discovery API](/docs/dbt-cloud-apis/discovery-api). The metadata that's available on your project depends on the [deployment environment](/docs/deploy/deploy-environments) you've designated as _production_ in your dbt Cloud project. dbt Explorer automatically retrieves the metadata updates after each job run in the production deployment environment so it will always have the latest state on your project. The metadata it displays depends on the [commands executed by the jobs](/docs/deploy/job-commands). For instance:

- To update model details or results, you must run `dbt run` or `dbt build` on a given model within a job in the environment.
- To view catalog statistics and columns, you must run `dbt docs generate` within a job in the environment.
- To view test results, you must run `dbt test` or `dbt build` within a job in the environment.
- To view source freshness check results, you must run `dbt source freshness` within a job in the environment.

The need to run these commands will diminish, and richer, more timely metadata will become available as the Discovery API and its underlying platform evolve.

:::tip Join the beta

dbt Explorer is a [beta feature](/docs/dbt-versions/product-lifecycles#dbt-cloud) and subject to change without notification. More updates to this feature coming soon.

If you’re interested in joining the beta, please contact your account team.

:::

## Prerequisites

- You have a [multi-tenant](/docs/cloud/about-cloud/tenancy#multi-tenant) or AWS single-tenant dbt Cloud account on the [Team or Enterprise plan](https://www.getdbt.com/pricing/).
- You have set up a [production deployment environment](/docs/deploy/deploy-environments#set-as-production-environment-beta) for each project you want to explore.
- There has been at least one successful job run in the production deployment environment.
- You are on the dbt Explorer page. This requires the feature to be enabled for your account.
- To go to the page, select **Explore (Beta)** from the top navigation bar in dbt Cloud.

## Explore the project’s lineage

dbt Explorer provides a visualization of your project’s <Term id="dag">DAG</Term> that you can interact with. To start, select **Overview** in the left sidebar and click the **Explore Lineage** button on the main (center) section of the page.

If you don't see the lineage graph immediately, click **Render Lineage**. It can take some time for the graph to render depending on the size of your project and your computer’s available memory. The graph of very large projects might not render so, instead, you can select a subset of nodes by using selectors.

The nodes in the lineage graph represent the project’s resources and the edges represent the relationships between the nodes. Resources like tests and macros display in the lineage within their [resource details pages](#view-resource-details) but not within the overall project lineage graph. Nodes are color-coded and include iconography according to their resource type.

To interact with the lineage graph, you can:

- Hover over any item in the graph to display the resource’s name and type.
- Zoom in and out on the graph by mouse-scrolling.
- Grab and move the graph.
- Click on a resource to highlight its relationship with other resources in your project.
- [Search and select specific resources](#search-resources) or a subset of the DAG using selectors and lineage (for example, `+[YOUR_RESOURCE_NAME]` displays all nodes upstream of a particular resource).
- [View resource details](#view-resource-details) by selecting a node in the graph (double-clicking).


<Lightbox src="/img/docs/collaborate/dbt-explorer/lineage-v1.gif" width="%" title="Explore the lineage graph" />


## Search for resources {#search-resources}
With the search bar (on the upper left of the page or in a lineage graph), you can search using keywords or selectors (also known as *selector methods*). The resources that match your search criteria will display as a table in the main section of the page. When you select a resource in the table, its [resource details page](#view-resource-details) will display.

When using keyword search, dbt Explorer will search through your resources using metadata such as resource type, resource name, column name, source name, tags, schema, database, version, alias/identifier, and package name.

When using selector search, you can utilize the dbt node selection syntax including set and graph operators (like `+`). To learn more about selectors, refer to [Syntax overview](/reference/node-selection/syntax), [Graph operators](/reference/node-selection/graph-operators), and [Set operators](/reference/node-selection/set-operators).

Below are the selection methods currently available in dbt Explorer. For more information about each of them, refer to [Methods](/reference/node-selection/methods).

- **fqn:** &mdash; Find resources by [file or fully qualified name](/reference/node-selection/methods#the-file-or-fqn-method).
- **source:** &mdash; Find resources by a specified [source](/reference/node-selection/methods#the-source-method).
- **resource_type:** &mdash; Find resources by their [type](/reference/node-selection/methods#the-resource_type-method).
- **package:** &mdash; Find resources by the [dbt package](/reference/node-selection/methods#the-package-method) that defines them.
- **tag:** &mdash; Find resources by a specified [tag](/reference/node-selection/methods#the-tag-method).

<VersionBlock firstVersion="1.5">

- **group:** &mdash; Find models defined within a specified [group](/reference/node-selection/methods#the-group-method).
- **access:** &mdash; Find models based on their [access](/reference/node-selection/methods#the-access-method) property.

</VersionBlock>

<Lightbox src="/img/docs/collaborate/dbt-explorer/search-v1.gif" title="Explore the search bar" />

## Use the catalog sidebar

By default, the catalog sidebar lists all your project’s resources. Select any resource type in the list and all those resources in the project will display as a table in the main section of the page. For a description on the different resource types (like models, metrics, and so on), refer to [About dbt projects](https://docs.getdbt.com/docs/build/projects).

To browse using a different view, you can choose one of these options from the **View by** dropdown:

- **Resources** (default) &mdash; All resources in the project organized by type.
- **Packages** &mdash; All resources in the project organized by the project in which they are defined.
- **File Tree** &mdash; All resources in the project organized by the file in which they are defined. This mirrors the file tree in your dbt project repository.
- **Database** &mdash; All resources in the project organized by the database and schema in which they are built. This mirrors your data platform structure.

<Lightbox src="/img/docs/collaborate/dbt-explorer/catalog-sidebar-v1.gif" title="Explore the catalog sidebar" />

## View resource details {#view-resource-details}
You can view the definition and latest run results of any resource in your project. To find a resource and view its details, you can interact with the lineage graph, use search, or browse the catalog. The details (metadata) available to you depends on the resource’s type, its definition, and the [commands](/docs/deploy/job-commands) run within jobs in the production environment.

<Lightbox src="/img/docs/collaborate/dbt-explorer/model-resource-details-v1.gif" title="Explore a model's resource details" />



### Example of model details

An example of the details you might get for a model:

- **General** &mdash; The model’s lineage graph that you can interact with.
- **Code** &mdash; The source code and compiled code for the model.
- **Columns** &mdash; The available columns in the model.
- **Description** &mdash; A [description of the model](/docs/collaborate/documentation#adding-descriptions-to-your-project).
- **Recent** &mdash; Information on the last time the model ran, how long it ran for, whether the run was successful, the job ID, and the run ID.
- **Tests** &mdash; [Tests](/docs/build/tests) for the model.
- **Details** &mdash; Key properties like the model’s relation name (for example, how it’s represented and how you can query it in the data platform: `database.schema.identifier`); model governance attributes like access, group, and if contracted; and more.
- **Relationships** &mdash; The nodes the model **Depends On** and is **Referenced by.**

### Example of exposure details

An example of the details you might get for an exposure:

- **Status** &mdash; The status on data freshness and data quality.
- **Lineage** &mdash; The exposure’s lineage graph.
- **Description** &mdash; A description of the exposure.
- **Details** &mdash; Details like exposure type, maturity, owner information, and more.
- **Relationships** &mdash; The nodes the exposure **Depends On**.

### Example of test details

An example of the details you might get for a test:

- **General** &mdash; The test’s lineage graph that you can interact with.
- **Code** &mdash; The source code and compiled code for the test.
- **Description** &mdash; A description of the test.
- **Recent** &mdash; Information on the last time the test ran, how long it ran for, whether the test passed, the job ID, and the run ID.
- **Details** &mdash; Details like schema, severity, package, and more.
- **Relationships** &mdash; The nodes the test **Depends On**.

### Example of source details

An example of the details you might get for each source table within a source collection:

- **General** &mdash; The source’s lineage graph that you can interact with.
- **Columns** &mdash; The available columns in the source.
- **Description** &mdash; A description of the source.
- **Source freshness** &mdash; Information on whether refreshing the data was successful, the last time the source was loaded, the timestamp of when a run generated data, and the run ID.
- **Details** &mdash; Details like database, schema, and more.
- **Relationships** &mdash; A table that lists all the sources used with their freshness status, the timestamp of when freshness was last checked, and the timestamp of when the source was last loaded.
64 changes: 56 additions & 8 deletions website/docs/docs/core/connect-data-platform/snowflake-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,13 @@ my-snowflake-db:

### 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.
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.

**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). See [the Snowflake docs](https://docs.snowflake.com/en/sql-reference/parameters.html#label-allow-id-token) for how to enable this feature in your account.
Refer to the following tabs for more info and examples:

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

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

Expand All @@ -175,15 +179,15 @@ my-snowflake-db:
outputs:
dev:
type: snowflake
account: [account id]
user: [username]
role: [user role]
account: [account id] # Snowflake <account_name>
user: [username] # Snowflake username
role: [user role] # Snowflake user role
# SSO config
authenticator: externalbrowser
database: [database name]
warehouse: [warehouse name]
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
Expand All @@ -199,6 +203,50 @@ my-snowflake-db:

</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: False # default: false
```

</File>

</TabItem>
</Tabs>

**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.

## Configurations

Expand All @@ -224,7 +272,7 @@ The "base" configs for Snowflake targets are shown below. Note that you should a
| reuse_connections | No | A boolean flag indicating whether to reuse idle connections to help reduce total connections opened. Default is `False`. |

### account
For AWS accounts in the US West default region, you can use `abc123` (without any other segments). For some AWS accounts you will have to append the region and/or cloud platform. For example, `abc123.eu-west-1` or `abc123.eu-west-2.aws`. For GCP and Azure-based accounts, you have to append the region and cloud platform, such as `gcp` or `azure`, respectively. For example, `abc123.us-central1.gcp`. For details, see Snowflake's documentation: "[Specifying Region Information in Your Account Hostname](https://docs.snowflake.com/en/user-guide/intro-regions.html#specifying-region-information-in-your-account-hostname)" and "[Account Identifier Formats by Cloud Platform and Region](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#account-identifier-formats-by-cloud-platform-and-region)".
For AWS accounts in the US West default region, you can use `abc123` (without any other segments). For some AWS accounts you will have to append the region and/or cloud platform. For example, `abc123.eu-west-1` or `abc123.eu-west-2.aws`. For GCP and Azure-based accounts, you have to append the region and cloud platform, such as `gcp` or `azure`, respectively. For example, `abc123.us-central1.gcp`. For details, see Snowflake's documentation: "[Specifying Region Information in Your Account Hostname](https://docs.snowflake.com/en/user-guide/intro-regions.html#specifying-region-information-in-your-account-hostname)". Please also note that the Snowflake account name should only be the <account_name> without the prefixed <organization_name>. Relevant documentation: "[Account Identifier Formats by Cloud Platform and Region](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#account-identifier-formats-by-cloud-platform-and-region)".

### client_session_keep_alive

Expand Down
4 changes: 2 additions & 2 deletions website/docs/docs/dbt-cloud-apis/discovery-querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Below is an example that returns the `first` 500 models `after` the specified Ob
<!-- TODO: Update screenshot to use `$environmentId: BigInt!, or remove it` -->
<!-- However we can choose to leave this be, since the important info from the screenshot is to show how the GraphQL API canbe used -- the content (request and response) doesn't matter too much` -->

<Lightbox src="/img/paginate.png" width="75%" title="Example of pagination"/>
<Lightbox src="/img/Paginate.png" width="75%" title="Example of pagination"/>

Below is a code example of the `PageInfo` object:

Expand All @@ -191,7 +191,7 @@ Filtering helps to narrow down the results of an API query. If you want to query

Below is an example that filters for results of models that have succeeded on their `lastRunStatus`:

<Lightbox src="/img/filtering.png" width="75%" title="Example of filtering"/>
<Lightbox src="/img/Filtering.png" width="75%" title="Example of filtering"/>

Below is an example that filters for models that have an error on their last run and tests that have failed:

Expand Down
Loading

0 comments on commit 703b6f9

Please sign in to comment.