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

How to update custom overrides of collect_freshness macro for 1.5 #3331

Closed
1 task done
dbeatty10 opened this issue May 3, 2023 · 0 comments · Fixed by #3740
Closed
1 task done

How to update custom overrides of collect_freshness macro for 1.5 #3331

dbeatty10 opened this issue May 3, 2023 · 0 comments · Fixed by #3740
Assignees
Labels
content Improvements or additions to content dbt-core v1.5 Docs impact for the v1.5 release (Apr 2023) improvement Use this when an area of the docs needs improvement as it's currently unclear

Comments

@dbeatty10
Copy link
Contributor

dbeatty10 commented May 3, 2023

Contributions

  • I have read the contribution docs, and understand what's expected of me.

Link to the page on docs.getdbt.com requiring updates

https://docs.getdbt.com/guides/migration/versions/upgrading-to-v1.5

What part(s) of the page would you like to see updated?

There is a change in dbt 1.5 to collect_freshness (changed in 17014bf).

This requires overrides for this macro to have a different return statement for <1.4 and >=1.5.

<1.4:

{{ return(load_result('collect_freshness').table) }}

>1.5:

{{ return(load_result('collect_freshness')) }}

This can affect both dbt package maintainers and end-users that have an override of collect_freshness.

See dbt-labs/dbt-core#7489 (comment)

More discussion and detail here:
https://getdbt.slack.com/archives/C03SAHKKG2Z/p1683135194734689?thread_ts=1683127164.993329&cid=C03SAHKKG2Z

Additional information

Ideally, we can provide an example of logic that will switch the return statement depending upon the version of dbt that is being executed.

@dbeatty10 dbeatty10 added content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear dbt-core v1.5 Docs impact for the v1.5 release (Apr 2023) labels May 3, 2023
@dbeatty10 dbeatty10 added this to the dbt Core v1.5 Documentation milestone May 3, 2023
@nghi-ly nghi-ly self-assigned this Jul 13, 2023
nghi-ly added a commit that referenced this issue Jul 21, 2023
## What are you changing in this pull request and why?

In v1.5, the collect_freshness macro returns a `response` object instead
of just a `table` result. This affects anyone who's overriding this
macro. Add this behavioral change to the 1.5 migration guide:

https://docs.getdbt.com/guides/migration/versions/upgrading-to-v1.5 

Resolves #3331 

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [ ] Needs review from product team
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content dbt-core v1.5 Docs impact for the v1.5 release (Apr 2023) improvement Use this when an area of the docs needs improvement as it's currently unclear
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants