How to declare external downstream dependencies with column level tests

The problem I’m having

After my dbt transformations happen, I have some production downstream systems that query the snowflake tables.
And now, I’d like to create tests of some kind that will prevent people from changing columns in those tables that are being read from the downstream systems without also updating a yaml file or the downstream systems, but I’m not sure how to do this.
I saw I can define an exposure Add Exposures to your DAG | dbt Developer Hub, but this only adds that downstream dep to the DAG but adds no guarantees around alerting people if they’re changing a field in the dbt model that the downstream uses.

The context of why I’m trying to do this

Specifically I want this so that someone doesn’t accidentally remove/rename a column in the dbt model because they see that it’s not being used anywhere else in the dbt codebase, even though it is being used by that external dep.
If I could explicitly name columns in the exposure definition that could work, but given that doesn’t seem possible, I’m also open to other alternatives.

What I’ve already tried


1 Like

I think this could be achieved by including contracts for the models you are referencing here?

I am feeling the same way though, I wish we could merge the two concepts - exposures that have contracts.

ex. Say there is a dashboard that relies on Orders and Customers,
specifically the customer_region, and orders_count.

I would want an exposure that defines the owner of that dashboard, and a contract that tests for the existence of customer_region and orders_count, but it wouldn’t care about any of the other columns in those models.