Let’s say I have a model that ref()
s models of deprecated tables which will not be modified.
I have other things that depend on this model, and I’d therefore like to be able to ref()
this model in those models for the dbt docs.
I also want to be able to version control the SQL.
However, I don’t ever want this model to run, because it’ll always return the same results and is therefore wasteful.
I’ve looked at analyses, seeds, and snapshots, but it seems like none fit. I’ve looked at the enabled
config, but that prevents anything from referencing the model.
I know I can simply use exclude
in a dbt run
command, but that requires us to always remember to exclude this one model, and we’re running dbt from within Fivetran, so passing custom CLI flags isn’t even an option for us.
I’ve also looked at custom selectors, where we could default to excluding this model. However, unless I’m misunderstanding, those don’t seem very useful, given:
If I run a command that defines its own selection criteria (via --select, --exclude, or --selector), dbt will ignore the default selector and use the flag criteria instead. It will not try to combine the two.
exclude
gives me exactly what I want in terms of functionality - I just need a way to apply it permanently to that model.
If this just isn’t possible, any suggestions that’ll accomplish my below objectives would be most appreciated!:
- Keep it in the repo for documentation (using
ref()
s) - Version control the SQL
Thank you!