dbt-labs/dbt-project-evaluator

Add model version information to int_all_dag_relationships

schicks opened this issue · 2 comments

Describe the feature

I want to be able to write a test saying that some set of models (public models, models with cross project dependencies, etc.; can imagine a few different ways to slice it) must be versioned. Currently there is not version data in int_all_dag_relationships, which makes this hard to write, but if there were version data exposed via one of the models in this package it would become fairly easy to write.

Describe alternatives you've considered

I explored making the warning for breaking contract changes into an error as an alternative. However, because this is set as a flag it is not feasible to configure in a flexible enough way. The goal here is to enforce this rule on a subset of models for whom breaking changes are high risk because they are consumed by other teams or projects deployed separately. As a flag, we either have to enforce it on all models or no models.

Additional context

I don't think the DB matters here, but I use bigquery.

Who will this benefit?

The primary goal would be to make it easier and safer to manage multi project systems, by enforcing at an organizational level (through a shared dbt package) that any model you are consuming from another project will not break their existing contract within a version. This enforces the standard software best practice that is commonplace for code packages.

Are you interested in contributing this feature?

I would be happy to contribute, but would need advice on where and how to make this change.

hey @schicks ! thanks opening the issue. did you take a look at int_all_graph_resources by chance? I believe we include version info here, and you could likely join across the two models to develop this test!

Amazing! That seems like exactly what I'm looking for. Thank you!