can I 'disable' a dbt job from being run?

The problem I’m having

In dbt Cloud, some times I’d like to ‘disable’ a dbt job so that the job is still defined / exists, but when triggered, it doesn’t actually execute the steps.

The context of why I’m trying to do this

We orchestrate the dbt jobs triggering from a pipeline within ADF. Sometimes when we are testing ADF pipelines, we want it to trigger the dbt jobs but we don’t want the actual dbt job steps to execute anything & just return successful. Right now, we ‘disable’ the dbt job by editing the steps and intentionally change the pointers to models to something that doesn’t exist, so dbt just says ‘nothing to do’ and exits gracefully & successfully.
I’d love to be able to just have a check box against each job to 'enable/disable/ the job. This would save me having to manually muck around with the steps.

What I’ve already tried

see above.

@joellabes can you help?

Perhaps you could add an environment variable called something like DBT_MODEL_DRY_RUN which is defaulted to false, and pass through a True from ADF when you’re experimenting? To make this work, you would put a global enabled flag in your dbt_project.yml:


  +enabled: {{ not env_var('DBT_MODEL_DRY_RUN' | as_bool }}

I don’t like the double-negative there, so maybe call it DBT_MODEL_WET_RUN instead and invert the logic :sweat_smile: