dbt-core icon indicating copy to clipboard operation
dbt-core copied to clipboard

ExposureType - custom extension of EnumType

Open daniel-bartley opened this issue 1 year ago • 3 comments

Is this your first time submitting a feature request?

  • [X] I have read the expectations for open source contributors
  • [X] I have searched the existing issues, and I could not find an existing issue for this feature
  • [X] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

In the wild, I'm seeing lots of spreadsheets with dependencies on the data warehouse. We like to register them as exposures for visibility. How would we extend ExposureType to include "spreadsheet"? Is it possible without modifying dbt core?

Describe alternatives you've considered

We use "application" but it's not intuitive. Feels pretentious.

Who will this benefit?

report builders documenting downstream spreadsheets as dbt exposures.

Are you interested in contributing this feature?

yes

Anything else?

No response

daniel-bartley avatar Feb 20 '24 09:02 daniel-bartley

Feels pretentious.

:)

I'm totally supportive of doing this. Two possibilities, discussed a while ago:

  1. Users get to define their own set of valid exposure types somewhere (in dbt_project.yml?). Then, each defined exposure has to conform to one of those types. The idea here is to prevent someone from accidentally merging code with an exposure type defined as dshboard (typo), or from putting excel when we'd previously agreed on the more-generic spreadsheet.
  2. It's a free-form input, we just do smarter things in the places where we bucket/categorize exposures. If an exposure is in a type category by itself, we should bucket it under Custom or Other instead.

jtcohen6 avatar Feb 20 '24 13:02 jtcohen6

what if the exposureType enum could be overridden by a variable in dbt_project.yml?

daniel-bartley avatar Feb 20 '24 22:02 daniel-bartley

Thanks for this insight @daniel-bartley !

We're going to refine the experience and interface for this as part of revisiting the experience for exposures.

dbeatty10 avatar Feb 22 '24 16:02 dbeatty10