Skip to content

Commit

Permalink
Merge branch 'current' into mwong-ssl-addition-postgres-redshift
Browse files Browse the repository at this point in the history
  • Loading branch information
runleonarun authored Oct 17, 2022
2 parents 3cad446 + 7b4e7f4 commit e75b0ad
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion website/dbt-global-variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports.dbtVariables = {
}
]
},
dbt-the-product: {
dbtTheProduct: {
name: "dbt"
},
dbtCore: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
title: "Python models"
---

:::info Prerelease
:::info Brand new!

dbt Core v1.3, currently available as a release candidate, adds Python models to dbt. Note that only [specific data platforms](#specific-data-platforms) support dbt-py models.
dbt Core v1.3 included first-ever support for Python models. Note that only [specific data platforms](#specific-data-platforms) support dbt-py models.

We encourage you to:
- Read [the original discussion](https://github.com/dbt-labs/dbt-core/discussions/5261) that proposed this feature.
- Contribute to [best practices for developing Python models in dbt](https://github.com/dbt-labs/docs.getdbt.com/discussions/1811).
- Weigh in on [next steps for Python models, beyond v1.3](https://github.com/dbt-labs/dbt-core/discussions/5742).
- Join the **#beta-feedback-python-models** channel in the [dbt Community Slack](https://www.getdbt.com/community/join-the-community/).

Below, you'll see sections entitled "❓ **Our questions**." We are excited to release a first narrow set of functionality in v1.3, which will solve real use cases. We also know this is a first step into a much wider field of possibility. We don't pretend to have all the answers. We're excited to keep developing our opinionated recommendations and next steps for product development—and we want your help. Comment in the GitHub discussions; leave thoughts in Slack; bring up dbt + Python in casual conversation with colleagues and friends.
Below, you'll see sections entitled "❓ **Our questions**." We are excited to have released a first narrow set of functionality in v1.3, which will solve real use cases. We also know this is a first step into a much wider field of possibility. We don't pretend to have all the answers. We're excited to keep developing our opinionated recommendations and next steps for product development—and we want your help. Comment in the GitHub discussions; leave thoughts in Slack; bring up dbt + Python in casual conversation with colleagues and friends.
:::

## About Python models in dbt
Expand Down
11 changes: 7 additions & 4 deletions website/docs/guides/migration/versions/05-upgrading-to-v1.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ title: "Upgrading to v1.3 (latest)"

## Breaking changes

There are no breaking changes for code in dbt projects and packages. We are committed to providing backward compatibility for all versions 1.x. If you encounter an error upon upgrading, please let us know by [opening an issue](https://github.com/dbt-labs/dbt-core/issues/new).
We are committed to providing backward compatibility for all versions 1.x. If you encounter an error upon upgrading, please let us know by [opening an issue](https://github.com/dbt-labs/dbt-core/issues/new).

**Note:** If you have custom code accessing the `raw_sql` property of models (with the [model](dbt-jinja-functions/model) or [graph](/reference/dbt-jinja-functions/graph) objects), it has been renamed to `raw_code`. This is a change to the manifest contract, described in more detail below.
There are three changes in dbt Core v1.3 that may require action from some users:
1. If you have a `profiles.yml` file located in the root directory where you run dbt, dbt will start preferring that profiles file over the default location on your machine. [More details](connection-profiles/advanced-customizing-a-profile-directory)
2. If you already have `.py` files defined in the `model-paths` of your dbt project, dbt will start trying to read them as Python models. You can use [the new `.dbtignore` file](dbtignore) to tell dbt to ignore those files.
3. If you have custom code accessing the `raw_sql` property of models (with the [model](dbt-jinja-functions/model) or [graph](/reference/dbt-jinja-functions/graph) objects), it has been renamed to `raw_code`. This is a change to the manifest contract, described in more detail below.

### For users of dbt Metrics

Expand Down Expand Up @@ -41,10 +44,10 @@ _GitHub discussion forthcoming_
## New and changed documentation

- **[Python models](building-models/python-models)** are natively supported in `dbt-core` for the first time, on data warehouses that support Python runtimes.
- Updates made to **[Metrics](building-a-dbt-project/metrics)** reflect their new syntax for definition, as well as additional properties that are now available.
- Updates made to **[Metrics](build/metrics)** reflect their new syntax for definition, as well as additional properties that are now available.
- Plus, a few related updates to **[exposure properties](exposure-properties)**: `config`, `label`, and `name` validation.
- **[Custom `node_color`](/docs/reference/resource-configs/docs.md)** in `dbt-docs`. For the first time, you can control the colors displayed in dbt's DAG. Want bronze, silver, and gold layers? It's at your fingertips.
- Search for **[`Profiles.yml`](/docs/dbt-cli/configure-your-profile#advanced-customizing-a-profile-directory)** in the current working directory before `~/.dbt`
- **[`Profiles.yml`](connection-profiles/advanced-customizing-a-profile-directory)** search order now looks in the current working directory before `~/.dbt`.

### Quick hits
- **["Full refresh"](full_refresh)** flag supports a short name, `-f`.
Expand Down
25 changes: 25 additions & 0 deletions website/docs/reference/dbtignore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: .dbtignore
---

You can create a `.dbtignore` file in the root of your [dbt project](projects) to specify files that should be **entirely** ignored by dbt. The file behaves like a [`.gitignore` file, using the same syntax](https://git-scm.com/docs/gitignore). Files and subdirectories matching the pattern will not be read, parsed, or otherwise detected by dbt—as if they didn't exist.

**Examples**

<File name=".dbtignore">

```md
# .dbtignore

# ignore individual .py files
not-a-dbt-model.py
another-non-dbt-model.py

# ignore all .py files
**.py

# ignore all .py files with "codegen" in the filename
*codegen*.py
```

</File>
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ const sidebarSettings = {
label: "Project configs",
items: [
"reference/dbt_project.yml",
"reference/dbtignore",
"reference/project-configs/analysis-paths",
"reference/project-configs/asset-paths",
"reference/project-configs/clean-targets",
Expand Down

0 comments on commit e75b0ad

Please sign in to comment.