# dbt Cloud run in deployment only one model of job

**URL:** <https://discourse.getdbt.com/t/dbt-cloud-run-in-deployment-only-one-model-of-job/6066>\
**Category:** Help\
**Tags:** orchestration-and-deployment, dbt-cloud\
**Created:** [January 12, 2023, 3:08pm UTC](https://discourse.getdbt.com/t/dbt-cloud-run-in-deployment-only-one-model-of-job/6066 "2023-01-12T15:08:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoni](https://avatars.discourse-cdn.com/v4/letter/y/ee59a6/32.png) [@yoni](https://discourse.getdbt.com/u/yoni)\
**Post date:** [January 12, 2023, 3:08pm UTC](https://discourse.getdbt.com/t/dbt-cloud-run-in-deployment-only-one-model-of-job/6066/1 "2023-01-12T15:08:29Z")

</div>

Hi all,

I am trying to run one model in production and outside of the Job (set of models) but can’t figure out how it is possible.

I have two environments on dbt Cloud:

- development with the target name ‘dev’ and the bigquery dataset ‘analytics\_dev’
- deployment with target name ‘default’ and bigquery dataset 'analytics

I have modified a model in the development environment and it does return the expected result by running ‘dbt run --select model\_name’ on the command line. The code modification was merged to the git repo.

I would now like to deploy it in production.  
This model is part of a Job that runs a set of models.

The problem is that I don’t want to run all the models in the Job. I only want to run the modified model.  
Is there any way through the command line (or whatever) to run only one model from the models in the job in production?

I tried ‘dbt run --select model\_name --target default’ but the target name is ignored since it is launched in the development environment.

However I know that this command would work with dbt CLI if profiles.yml is configured properly. I therefore imagine that it is somewhat also possible in dbt Cloud

Best,

---

<div class="post-metadata">

**Author:** ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Post date:** [January 13, 2023, 4:30am UTC](https://discourse.getdbt.com/t/dbt-cloud-run-in-deployment-only-one-model-of-job/6066/2 "2023-01-13T04:30:52Z")

</div>

Hey Yoni!

Deployment runs can only run through the scheduler, not the command line inside of the IDE.

What I normally do is have a Job called something like `Adhoc Runs` and edit its command when I need to do this sort of one-off refresh.

> [@yoni](#):
>
> I only want to run the modified model.

The other thing you could do is set up a job which takes advantage of deferral and the [`state:modified` selector](https://docs.getdbt.com/docs/deploy/about-state). Our docs mostly refer to this in a [CI context](https://docs.getdbt.com/docs/deploy/cloud-ci-job#configuring-a-dbt-cloud-ci-job), but you can use it in the same way for an adhoc production job which compares itself to your daily production run.

---

<div class="post-metadata">

**Author:** ![yoni](https://avatars.discourse-cdn.com/v4/letter/y/ee59a6/32.png) [@yoni](https://discourse.getdbt.com/u/yoni)\
**Post date:** [January 13, 2023, 8:09am UTC](https://discourse.getdbt.com/t/dbt-cloud-run-in-deployment-only-one-model-of-job/6066/3 "2023-01-13T08:09:32Z")

</div>

Defining an adhoc job is exactly what I was planning to do but it seemed a bit time-consuming each time.  
I will study the second solution  
Thank you for your help Joel!
