-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Bug] Enforced contracts break recursive CTE rules #582
Comments
@jtcohen6 do you remember if this is an expected limitation on BQ? |
@Fleid Not intended/expected, I didn't know this limitation existed until just now (thanks @christineberger!), worth documenting here: https://docs.getdbt.com/docs/collaborate/govern/model-contracts#where-are-contracts-supported This feels like a limitation of BQ's SQL syntax, more than something I'm motivated to try to work around. Do you feel the same or different? |
I agree. I'll update this as a feature request, and update the doc. I'm also moving it to 'help_wanted', as this is not something that we will be able to address soon. Thanks a lot for surfacing @christineberger, sorry we can't get you a quicker solution on this. |
* init push of adding two new bash scripts to be triggered off cut-release action * add changelog * remove unused stuff from sh file * remove unneeded changelog
Co-authored-by: colin-rogers-dbt <[email protected]>
* bumping .latest branch variable in update_dependencies.sh to 1.5.latest * updating env variable to 1.5.latest in nightly-release.yml * created 1.5.0rc1 changelog (#566) * updated changelog (#569) * Bumping version to 1.5.0 and generate changelog * Fix Issue URLs in 1.5.0 Changelog (#582) * Fix 1.5.0 changelog links * Patch changie for Spark->Snowflake * fix regular expression for redaction of row values redaction of row values did not work if value contained '\n' characters, eg in JSON, format because the regular expression would fail to detect such values and thus, the data would not get redacted. I added the newline character to the regular expression to fix this. * finish rebase * added changelog --------- Co-authored-by: Github Build Bot <[email protected]> Co-authored-by: Mike Alfare <[email protected]> Co-authored-by: Kevin Wang <[email protected]> Co-authored-by: Matthew McKnight <[email protected]>
…582) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Is this a new bug in dbt-bigquery?
Current Behavior
Recursive CTEs work in a model because can exist at the top-level. When enforcing contracts, a
select * from ()
is wrapped around the model query which breaks usage rules of BQ recursive CTEs.Expected Behavior
Models with recursive CTEs are able to build with enforced contracts
Steps To Reproduce
test_model_v1.sql
test_model
:dbt run -s test_model
_models.yml
and uncomment the config for contractsRelevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: