dbt-project-evaluator icon indicating copy to clipboard operation
dbt-project-evaluator copied to clipboard

Validate model version names are acceptable

Open epapineau opened this issue 8 months ago • 2 comments

Describe the feature

How we style our dbt Models says:

🔢 Versions of models should use the suffix _v1, _v2, etc for consistency (customers_v1 and customers_v2).

However, when we define dbt models, any version name is accepted. Like there is a fct_model_naming_conventions, we should have a fct_version_naming_conventions.

Describe alternatives you've considered

Modifying the generate_alias_name macro to bake in validation there. I do not like this idea, especially as we just recently removed a confusing customization of this macro from our project

Additional context

Relevant to all dbt projects

Who will this benefit?

code reviewers

Are you interested in contributing this feature?

You know it

epapineau avatar Oct 31 '23 01:10 epapineau

hello @epapineau! what a treat to see you here

just so i'm understanding, this would effectively check to make sure you're not using the defined_in parameter, correct? Additionally, I believe dbt-core allows you to use an un-suffixed name for your latest version i.e. customers and customers_v2-- wondering if there's a clean way to write the logic in that case?

dave-connors-3 avatar Nov 20 '23 21:11 dave-connors-3

@epapineau do you want to take this on?

dave-connors-3 avatar Jan 04 '24 16:01 dave-connors-3