Skip to content

Commit

Permalink
Merge branch 'current' into patch-5
Browse files Browse the repository at this point in the history
  • Loading branch information
alison985 authored Sep 28, 2023
2 parents 4d1e96f + bc4f0a7 commit 4f82ca4
Show file tree
Hide file tree
Showing 119 changed files with 253 additions and 1,063 deletions.
120 changes: 52 additions & 68 deletions website/dbt-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,61 @@ exports.versions = [
version: "1.2",
EOLDate: "2023-07-26",
},
{
version: "1.1",
EOLDate: "2023-04-28",
},
]

exports.versionedPages = [
{
"page": "docs/build/build-metrics-intro",
"firstVersion": "1.6",
},
{
"page": "docs/build/sl-getting-started",
"firstVersion": "1.6",
},
{
"page": "docs/build/about-metricflow",
"firstVersion": "1.6",
},
{
"page": "docs/build/join-logic",
"firstVersion": "1.6",
},
{
"page": "docs/build/validation",
"firstVersion": "1.6",
},
{
"page": "docs/build/semantic-models",
"firstVersion": "1.6",
},
{
"page": "docs/build/group-by",
"firstVersion": "1.6",
},
{
"page": "docs/build/entities",
"firstVersion": "1.6",
},
{
"page": "docs/build/metrics-overview",
"firstVersion": "1.6",
},
{
"page": "docs/build/cumulative",
"firstVersion": "1.6",
},
{
"page": "docs/build/derived",
"firstVersion": "1.6",
},
{
"page": "docs/build/measure-proxy",
"firstVersion": "1.6",
},
{
"page": "docs/build/ratio",
"firstVersion": "1.6",
},
{
"page": "reference/commands/clone",
"firstVersion": "1.6",
Expand Down Expand Up @@ -122,70 +170,6 @@ exports.versionedPages = [
{
"page": "reference/resource-configs/grants",
"firstVersion": "1.2",
},
{
"page": "docs/contributing/testing-a-new-adapter",
"firstVersion": "1.1",
},
{
"page": "reference/dbt-jinja-functions/selected_resources",
"firstVersion": "1.1",
},
{
"page": "reference/dbt-jinja-functions/print",
"firstVersion": "1.1",
},
{
"page": "docs/build/build-metrics-intro",
"firstVersion": "1.6",
},
{
"page": "docs/build/sl-getting-started",
"firstVersion": "1.6",
},
{
"page": "docs/build/about-metricflow",
"firstVersion": "1.6",
},
{
"page": "docs/build/join-logic",
"firstVersion": "1.6",
},
{
"page": "docs/build/validation",
"firstVersion": "1.6",
},
{
"page": "docs/build/semantic-models",
"firstVersion": "1.6",
},
{
"page": "docs/build/group-by",
"firstVersion": "1.6",
},
{
"page": "docs/build/entities",
"firstVersion": "1.6",
},
{
"page": "docs/build/metrics-overview",
"firstVersion": "1.6",
},
{
"page": "docs/build/cumulative",
"firstVersion": "1.6",
},
{
"page": "docs/build/derived",
"firstVersion": "1.6",
},
{
"page": "docs/build/measure-proxy",
"firstVersion": "1.6",
},
{
"page": "docs/build/ratio",
"firstVersion": "1.6",
}
]

Expand Down
16 changes: 16 additions & 0 deletions website/docs/community/resources/jobs-terms-and-conditions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "dbt Labs Community #jobs Channels Terms and Conditions"
id: "jobs-terms-and-conditions"
description: "Before posting a job in the dbt Community or submitting an application, review these terms and conditions."
---

I agree to abide by the [dbt Community Code of Conduct](community/resources/code-of-conduct) and all laws applicable to me in my use of the dbt Community's #jobs channels. I further agree:

- dbt Labs is not responsible for not does it warrant or guarantee the validity, accuracy, completeness, legality, or reliability of any functionality of any #jobs channel, any posting's content, or any application and/or solicitation of any kind of employment.
- dbt Labs does not review and approve job-related content.
- dbt Labs disclaims liability of any kind whatsoever for any type of damage that occurs while using the community Slack for job-related reasons, and I waive any type of claim (including actual, special or consequential damages) to the maximum extent permitted by law.
- Without limitation, dbt Labs disclaims liability for quality, performance, merchantability, and fitness for a particular purpose, express or implied, that may arise out of my use of the community Slack for job-related content, my reliance on such information, and/or my provision/receipt of job-related information.
- I understand that no internet-based site is without risk, and my use is at my own risk.
- My use of any job-posting template (or other forum for providing job-related information) confirms my consent to provide the data posted, confirms that I have permission to post such data, and is subject to the terms of the [dbt Labs privacy policy](https://www.getdbt.com/cloud/privacy-policy).

For further information, please contact [[email protected]](mailto:[email protected]).
4 changes: 2 additions & 2 deletions website/docs/community/resources/oss-expectations.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ In some cases, the right resolution to an open issue might be tangential to the
| `triage` | This is a new issue which has not yet been reviewed by a maintainer. This label is removed when a maintainer reviews and responds to the issue. |
| `bug` | This issue represents a defect or regression from the behavior that's documented, or that you reasonably expect |
| `enhancement` | This issue represents net-new functionality, including an extension of an existing capability |
| `good first issue` | This issue does not require deep knowledge of the codebase to implement. This issue is appropriate for a first-time contributor. |
| `help wanted` | This issue is trickier than a "good first issue." The required changes are scattered across the codebase, or more difficult to test. The maintainers are happy to help an experienced community contributor; they aren't planning to prioritize this issue themselves. |
| `good_first_issue` | This issue does not require deep knowledge of the codebase to implement. This issue is appropriate for a first-time contributor. |
| `help_wanted` | This issue is trickier than a "good first issue." The required changes are scattered across the codebase, or more difficult to test. The maintainers are happy to help an experienced community contributor; they aren't planning to prioritize this issue themselves. |
| `duplicate` | This issue is functionally identical to another open issue. The maintainers will close this issue and encourage community members to focus conversation on the other one. |
| `stale` | This is an old issue which has not recently been updated. In repositories with a lot of activity, stale issues will periodically be closed. |
| `wontfix` | This issue does not require a code change in the repository, or the maintainers are unwilling to merge a change which implements the proposed behavior. |
Expand Down
4 changes: 2 additions & 2 deletions website/docs/docs/build/about-metricflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ This guide introduces MetricFlow's fundamental ideas for new users. MetricFlow,

:::info

MetricFlow is a new way to define metrics in dbt and one of the key components of the [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl). It handles SQL query construction and defines the specification for dbt semantic models and metrics.
MetricFlow is a new way to define metrics and one of the key components of the [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl). It handles SQL query construction and defines the specification for dbt semantic models and metrics.

To fully experience the dbt Semantic Layer, including the ability to query dbt metrics via external integrations, you'll need a [dbt Cloud Team or Enterprise account](https://www.getdbt.com/pricing/).
MetricFlow is currently available on dbt v1.6 or higher for all users. dbt Core users can use the MetricFlow CLI to define metrics in their local dbt Core project. However, to experience the power of the universal [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl) and query those metrics in downstream tools, you'll need a dbt Cloud [Team or Enterprise](https://www.getdbt.com/pricing/) account.

:::

Expand Down
5 changes: 2 additions & 3 deletions website/docs/docs/build/build-metrics-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ Use MetricFlow in dbt to centrally define your metrics. As a key component of th
Use familiar constructs like semantic models and metrics to avoid duplicative coding, optimize your development workflow, ensure data governance for company metrics, and guarantee consistency for data consumers.

:::info
MetricFlow is currently available on dbt v1.6 or higher. MetricFlow provides a new way to define metrics in dbt and replaces the dbt_metrics package.
MetricFlow is currently available on dbt v1.6 or higher and allows users to define metrics in their dbt project whether in dbt Cloud or dbt Core. dbt Core users can use the MetricFlow CLI to define metrics in their local dbt Core project. However, to experience the power of the universal [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl) and query those metrics in downstream tools, you'll need a dbt Cloud [Team or Enterprise](https://www.getdbt.com/pricing/) account.

To use the dbt Semantic Layer, you must have a [dbt Cloud Team or Enterprise account](https://www.getdbt.com/pricing/).
:::

Before you start, consider the following guidelines:

- Define metrics in YAML and query them using these [new metric specifications](https://github.com/dbt-labs/dbt-core/discussions/7456).
- You must be on dbt v1.6 or higher to use MetricFlow. [Upgrade your dbt Cloud version](/docs/dbt-versions/upgrade-core-in-cloud) to get started.
- You must be on dbt v1.6 or higher to use MetricFlow. [Upgrade your dbt version](/docs/dbt-versions/upgrade-core-in-cloud) to get started.
- Use MetricFlow with Snowflake, BigQuery, Databricks, Postgres (CLI only), or Redshift. (dbt Cloud Postgres support coming soon)
- Unlock insights and query your metrics using the [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl) and its diverse range of [available integrations](/docs/use-dbt-semantic-layer/avail-sl-integrations).

Expand Down
2 changes: 0 additions & 2 deletions website/docs/docs/build/custom-databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ select * from ...

### generate_database_name

<Changelog>New in v0.16.0</Changelog>

The database name generated for a model is controlled by a macro called `generate_database_name`. This macro can be overridden in a dbt project to change how dbt generates model database names. This macro works similarly to the [generate_schema_name](/docs/build/custom-schemas#advanced-custom-schema-configuration) macro.

To override dbt's database name generation, create a macro named `generate_database_name` in your own dbt project. The `generate_database_name` macro accepts two arguments:
Expand Down
7 changes: 0 additions & 7 deletions website/docs/docs/build/custom-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ The following context methods _are_ available in the `generate_schema_name` macr

### Which vars are available in generate_schema_name?

<Changelog>

Variable semantics have changed in dbt v0.17.0. See the [migration guide](/guides/migration/versions)
for more information on these changes.

</Changelog>

Globally-scoped variables and variables defined on the command line with
[--vars](/docs/build/project-variables) are accessible in the `generate_schema_name` context.

Expand Down
7 changes: 0 additions & 7 deletions website/docs/docs/build/exposures.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ sidebar_label: "Exposures"
id: "exposures"
---

<Changelog>

* **v0.18.1**: Exposures are new!
* **v0.20.0**: Exposures support `tags` and `meta` properties

</Changelog>

Exposures make it possible to define and describe a downstream use of your dbt project, such as in a dashboard, application, or data science pipeline. By defining exposures, you can then:
- run, test, and list resources that feed into your exposure
- populate a dedicated page in the auto-generated [documentation](/docs/collaborate/documentation) site with context relevant to data consumers
Expand Down
121 changes: 0 additions & 121 deletions website/docs/docs/build/hooks-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,127 +68,6 @@ You can use hooks to provide database-specific functionality not available out-o
</File>


</VersionBlock>

<VersionBlock lastVersion="1.1">

### Examples using hooks

Here's a minimal example of using hooks to grant privileges. For more information, see [`on-run-start` & `on-run-end` hooks](/reference/project-configs/on-run-start-on-run-end) and [`pre-hook` & `post-hook`](/reference/resource-configs/pre-hook-post-hook) reference sections.

<File name='dbt_project.yml'>

```yml
on-run-end:
- "grant usage on {{ target.schema }} to role reporter"

models:
+post-hook:
- "grant select on {{ this }} to role reporter"

```

</File>

You can also apply the `post-hook` to individual models using a `config` block:

<File name='models/<model_name>.sql'>

```sql
{{ config(
post_hook=[
"grant select on {{ this }} to role reporter"
]
) }}

select ...

```

</File>

You should use database-specific syntax when appropriate:

<WHCode>

<div warehouse="BigQuery">

<File name='models/<model_name>.sql'>

```sql
{{ config(
post_hook=[
'grant `roles/bigquery.dataViewer` on {{ this.type }} {{ this }} to "user:[email protected]"'
]
) }}

select ...

```

</File>

</div>

<div warehouse="Databricks">

<File name='models/<model_name>.sql'>

```sql
{{ config(
post_hook=[
"grant select on {{ this }} to `[email protected]`"
]
) }}

select ...

```

</File>

</div>

<div warehouse="Redshift">

<File name='models/<model_name>.sql'>

```sql
{{ config(
post_hook=[
"grant select on {{ this }} to reporter"
]
) }}

select ...

```

</File>

</div>

<div warehouse="Snowflake">

<File name='models/<model_name>.sql'>

```sql
{{ config(
post_hook=[
"grant select on {{ this }} to role reporter"
]
) }}

select ...

```

</File>

</div>

</WHCode>

</VersionBlock>

### Calling a macro in a hook
Expand Down
4 changes: 0 additions & 4 deletions website/docs/docs/build/incremental-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ A `unique_key` enables updating existing rows instead of just appending new rows

Not specifying a `unique_key` will result in append-only behavior, which means dbt inserts all rows returned by the model's SQL into the preexisting target table without regard for whether the rows represent duplicates.

<VersionBlock firstVersion="1.1">

The optional `unique_key` parameter specifies a field (or combination of fields) that define the grain of your model. That is, the field(s) identify a single unique row. You can define `unique_key` in a configuration block at the top of your model, and it can be a single column name or a list of column names.

The `unique_key` should be supplied in your model definition as a string representing a single column or a list of single-quoted column names that can be used together, for example, `['col1', 'col2', …])`. Columns used in this way should not contain any nulls, or the incremental model run may fail. Either ensure that each column has no nulls (for example with `coalesce(COLUMN_NAME, 'VALUE_IF_NULL')`), or define a single-column [surrogate key](/terms/surrogate-key) (for example with [`dbt_utils.generate_surrogate_key`](https://github.com/dbt-labs/dbt-utils#generate_surrogate_key-source)).
Expand All @@ -95,8 +93,6 @@ When you pass a list in this way, please ensure that each column does not contai
Alternatively, you can define a single-column [surrogate key](/terms/surrogate-key), for example with [`dbt_utils.generate_surrogate_key`](https://github.com/dbt-labs/dbt-utils#generate_surrogate_key-source).
:::

</VersionBlock>

When you define a `unique_key`, you'll see this behavior for each row of "new" data returned by your dbt model:

* If the same `unique_key` is present in the "new" and "old" model data, dbt will update/replace the old row with the new row of data. The exact mechanics of how that update/replace takes place will vary depending on your database, [incremental strategy](#about-incremental_strategy), and [strategy specific configs](#strategy-specific-configs).
Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/build/materializations.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ When using the `table` materialization, your model is rebuilt as a <Term id="tab


### Incremental
`incremental` models allow dbt to insert or update records into a table since the last time that dbt was run.
`incremental` models allow dbt to insert or update records into a table since the last time that model was run.
* **Pros:** You can significantly reduce the build time by just transforming new records
* **Cons:** Incremental models require extra configuration and are an advanced usage of dbt. Read more about using incremental models [here](/docs/build/incremental-models).
* **Advice:**
Expand Down
Loading

0 comments on commit 4f82ca4

Please sign in to comment.