Michelle Ark
Michelle Ark
Additionally, we also expect to be able to wrap the user-provided sql in a subquery [when constructing the statement that unions actual and expected results for comparison here](https://github.com/dbt-labs/dbt-adapters/blob/main/dbt/include/global_project/macros/materializations/tests/helpers.sql#L23-L31). It seems...
It looks like the dbt-unit-testing package also experiences this limitation, which is unsurprising given the CTE-based approach: https://github.com/EqualExperts/dbt-unit-testing/issues/198 I think the only way to solve this generally is to use...
Hey @adamcunnington-mlg -- I've summarized some [spiking done](https://github.com/dbt-labs/dbt-bigquery/pull/1232) to evaluate the cost/benefit of implementing a batch-route for metadata freshness in BigQuery here: https://github.com/dbt-labs/dbt-bigquery/issues/938. There are more details in the spike...
Modifying `sql` directly makes sense as a workaround given the contracts are actually enforced on `sql`. `sql` should be the same value as `compiled_code`: https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/context/providers.py#L1511-L1516, but they are probably passed...
We're also seeing a similar warning in dbt-core, from these two lines: * https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/contracts/graph/unparsed.py#L540 * https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/contracts/graph/unparsed.py#L623 ``` UserWarning: dbt.contracts.graph.unparsed.UnparsedMetricTypeParams.expr (typing.Union[str, bool, None]): In the next release, data marked with Union...
> Is this something that applies to disabled nodes too, or is that handled somewhere else? hmm, good question. I don't believe we should be raising breaking contract changes for...
> If a node was previously enabled, with an enforced contract, and it is now disabled, I do believe that is a breaking change. (Same as if the node were...
Updating the docs here would make sense! https://docs.getdbt.com/docs/collaborate/govern/model-contracts#how-are-breaking-changes-handled
To make this backward-compatible, we could: 1. wrap the validation behind try/except blocks, and emit an event (snowplow as @ChenyuLInx mentioned above) if the validation fails for uncontracted models. Ideally...
Looks like this is flaking again: https://github.com/dbt-labs/dbt-core/actions/runs/8341943731/job/22829077630?pr=9769