-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add "tags" and "meta" properties to exposure schema #3405
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not included any changes that would enable selection of exposures using tags, a la
dbt ls --resource-type exposure --select tag:marketing
but I would be open to adding these to the PR if that is desired.
No need: this just works.
$ dbt ls --resource-type exposure --select tag:my_test_tag
exposure:my_project.my_test_exposure
I have also not altered anything in the docs server that would enable visualization there and not sure I'm qualified to do that work 😀
The meta
properties show up just fine for exposures, and I believe we'd only need to change one line to get tags
to show up too. It's just a matter of removing the part that says exclude="['tags']"
. Is that a change you'd be up to contribute? If so, could you open a new (stub) issue and new PR over in the dbt-docs repo?
In any case, this change LGTM. Thanks so much for opening the issue, owning the contribution, and seeing this get over the finish line!
@@ -725,6 +722,7 @@ def same_url(self, old: 'ParsedExposure') -> bool: | |||
|
|||
def same_contents(self, old: Optional['ParsedExposure']) -> bool: | |||
# existing when it didn't before is a change! | |||
# metadata/tags changes are not "changes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Agree with this.
Someday we may want to revisit the logic here (should a change to depends_on
count?), but in a world where users run -m state:modified+
in CI, I don't think an exposure marked modified would even alter behavior there.
Sure thing! |
resolves #3404
Description
This PR enables users to use the
tags
andmeta
properties on exposures, in the exact same way they would with other resources. Given the "read-only" nature of exposures, the main use case is around enabling more metadata to be added to exposures, to make them a more authoritative record of data products.I have not included any changes that would enable selection of exposures using tags, a la
dbt ls --resource-type exposure --select tag:marketing
but I would be open to adding these to the PR if that is desired.I have also not altered anything in the docs server that would enable visualization there and not sure I'm qualified to do that work 😀
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.