corp icon indicating copy to clipboard operation
corp copied to clipboard

Add exposure naming convention to style guide

Open epapineau opened this issue 2 years ago • 6 comments

There is no opinion put forth in the dbt style guide about how to name exposures.

epapineau avatar Nov 17 '22 01:11 epapineau

Some initial thoughts, which may be obvious, but I think stating the obvious has value.

  • It doesn't need to have exposure in the name - exposures appear differently in graphs
  • We should design for the functionality of exposures. I've only ever used them visually in the docs graph. What are other use cases at present?

ian-fahey avatar Nov 17 '22 14:11 ian-fahey

@ian-fahey-dbt Not sure I understand your first point. To your second point, my biggest 😍 for exposures is the ability to run dbt run -s +exposure:exposure_name. Need to instantly refresh everything for a specific dashboard? Done.

epapineau avatar Dec 02 '22 08:12 epapineau

@ian-fahey-dbt Not sure I understand your first point. To your second point, my biggest 😍 for exposures is the ability to run dbt run -s +exposure:exposure_name. Need to instantly refresh everything for a specific dashboard? Done.

I think I was just questioning whether exposure_ in the name was necessary. Is there a navigation reason this is best?

ian-fahey avatar Dec 05 '22 15:12 ian-fahey

@ian-fahey-dbt what convention did we land from the New Year, New Us effort?

epapineau avatar Jan 10 '23 04:01 epapineau

I believe we did keep exposure in it, but also a few other conventions shown here

ian-fahey avatar Jan 10 '23 14:01 ian-fahey

just like the rest of our model conventions, I would name an exposure with a prefix, like exp__, and then i would name it the name of the report / dashboard it represents. That way, when setting up jobs, and using that functionality that @epapineau mentioned, it's really clear what is building. Also, if you were to provide your BI team with the docs, they'd be able to know what's relevant to their dashboard without needing to ask.

lbenezra-FA avatar Jan 17 '23 17:01 lbenezra-FA