corp icon indicating copy to clipboard operation
corp copied to clipboard

Modify model naming conventions to account for model versioning

Open SamHarting opened this issue 1 year ago • 4 comments

In the 1.5 release we will be introducing model versioning! 🥂 🥳

As a result a model will have two parts:

  • The model name which is defined using the name configuration and will be used in the {{ ref() }} function
  • The file name which will show up in the directory and is pointed to in the yml configuration defined_in

As a result we will need to update our style guide to demonstrate how we think both the model name and file name should be structured.

SamHarting avatar Apr 21 '23 18:04 SamHarting

My opinion: model name: We keep this the same as our current suggestions. file name: This would just be the model name with a _v# appended to the end

During our training it was mentioned it could be anything such as _old and _new. I am not a fan of this because then it requires maintenance of the file names. That would be okay if it was all related to merges but since we are on track to schedule deprecation I am not sure that this would be a reliable way of doing things since the point a model should be renamed is no longer associated with a manual change.

SamHarting avatar Apr 21 '23 18:04 SamHarting

Another consideration here is IDE functionality. We now have the ability to copy file names or copy a reference to the model. Does the IDE use YML configurations to figure this stuff out or is it going strictly on file name? Is this something worth considering when making the naming conventions?

SamHarting avatar Apr 21 '23 18:04 SamHarting

I heard something about our style guide being updated a while back (I think @gwenwindflower was owning that initiative?). Worth checking if/when that's happening before updating our current guide!

wasilaq avatar Apr 28 '23 14:04 wasilaq

Great callout, Sam, and thank you for the tag Wasila -- will add to the new guide!

gwenwindflower avatar May 01 '23 00:05 gwenwindflower