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

Configuration for max_staleness should be string with explicit format, instead of integer #5218

Closed
1 task done
slothkong opened this issue Apr 3, 2024 · 0 comments · Fixed by #5220
Closed
1 task done
Labels
content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear

Comments

@slothkong
Copy link
Contributor

slothkong commented Apr 3, 2024

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/blog/announcing-materialized-views

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

While trying out materialized views on BigQuery, I seem to have found an error in the code snippet. The funny thing is there does not seem to be an "Edit this page" button on the actual docs website.

Bottom line is, max_staleness = 60 returned an error, but max_staleness = 'INTERVAL 60 MINUTE went through.

Additional information

I tested with:

  • dbt-core v1.7.3
  • dbt-bigquery v1.7.1
@slothkong slothkong added content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear labels Apr 3, 2024
slothkong added a commit to slothkong/docs.getdbt.com that referenced this issue Apr 3, 2024
amychen1776 added a commit that referenced this issue Apr 3, 2024
…licit format, instead of integer (#5220)

Resolves #5218 

## What are you changing in this pull request and why?
As stated in the issue description, while following the example code
snippets in the [Optimizing Materialized Views with dbt
](https://docs.getdbt.com/blog/announcing-materialized-views) page to
setup materialized views in BigQuery, I got a database error when I
defined `max_staleness=60` (as described in the blog).

When I instead changed that line of the `config` block to
`max_staleness='INTERVAL 60 MINUTE'`, the model successfully
materialized.

## Checklist

- [X] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [X]  Needs technical review

### Additional information

I tested with:
- `dbt-core`   v1.7.3
- `dbt-bigquery`  v1.7.1
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 improvement Use this when an area of the docs needs improvement as it's currently unclear
Projects
None yet
1 participant