Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.7 Migration Guide updates #4233

Merged
merged 11 commits into from
Oct 11, 2023
35 changes: 31 additions & 4 deletions website/docs/guides/migration/versions/00-upgrading-to-v1.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,38 @@ description: New features and changes in dbt Core v1.7

matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
dbt Labs is committed to providing backward compatibility for all versions 1.x, with the exception of any changes explicitly mentioned below. If you encounter an error upon upgrading, please let us know by [opening an issue](https://github.com/dbt-labs/dbt-core/issues/new).

### Behavior changes
## New and changed features and functionality

**COMING SOON**
- [`dbt docs generate`](/reference/commands/cmd-docs) now supports `--select` to generate documentation for a subset of your project. Currently available for Snowflake and Postgres only, but other adapters are coming soon.
- [Source freshness](/docs/deploy/source-freshness) can now be generated from warehouse metadata tables, currently snowflake only, but other adapters that have metadata tables are coming soon. If you configure source freshness without a `loaded_at_field`, dbt will try to determine freshness from warehouse metadata tables.
- The nodes dictionary in the `catalog.json` can now be "partial" if `dbt docs generate` is run with a selector.

### MetricFlow enhancements

- Automatically create metrics on measures with `create_metric: true`.
- Optional [`label`](/docs/build/semantic-models) in semantic_models, measures, dimensions and entities.
- New configurations for semantic models - [enable/disable](/reference/resource-configs/enabled), [group](/reference/resource-configs/group_), and [meta](/reference/resource-configs/meta).
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
- Support `fill_nulls_with` and `join_to_timespine` for metric nodes.
- `saved_queries` extends governance beyond the semantic objects to their consumption.

### For consumers of dbt artifacts (metadata)

- The [manifest](/reference/artifacts/manifest-json) schema version has been updated to v11.
- The [run_results](/reference/artifacts/run-results-json) schema version has been updated to v5.
- Added [node attributes](/reference/artifacts/run-results-json) related to compilation (`compiled`, `compiled_code`, `relation_name`).

### Quick hits

**COMING SOON**
### Model governance

Model governance was introduced in dbt Core v1.5 and it is continuing to be refined. The additional features and functionality have been added in v1.7 are as follows:
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

- **[Breaking change detection](/reference/resource-properties/versions) for models with contracts enforced:** When dbt detects a breaking change to a model with an enforced contract during state comparison, it will now raise an error for versioned models and a warning for models that are not versioned.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
- **[Set `access` as a config](/reference/resource-configs/access):** It's now possible to set a model's `access` within config blocks in the model's file or the `dbt_project.yml` for an entire subfolder at once.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
- **[Type aliasing for model contracts](/reference/resource-configs/contract):** dbt will use each adapter's built-in type aliasing for user-provided data types—meaning you can now write `string` always, and dbt will translate to `text` on Postgres/Redshift. This is on by default, and it's possible to opt-out.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
- **[Raise warning for numeric types](/reference/resource-configs/contract):** This led to issues when putting `numeric` in model contracts without considering that Snowflake interprets it as `numeric(38,0)`, and will round decimals accordingly. dbt will raise a warning if it sees a numeric type without specified precision/scale.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

### Quick hits

matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
- You can configure a `delimiter` for a seed file.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
- Support packages with the same git repo and unique subdirectory.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved
- Moved the `date_spine` macro from dbt-utils to dbt-core.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Moved the `date_spine` macro from dbt-utils to dbt-core.
- Find the `date_spine` macro in dbt-core instead of from dbt-utils.

Loading