# Source from Staging, Output to Dev

**URL:** <https://discourse.getdbt.com/t/source-from-staging-output-to-dev/5592>\
**Category:** Help\
**Created:** [December 13, 2022, 6:46pm UTC](https://discourse.getdbt.com/t/source-from-staging-output-to-dev/5592 "2022-12-13T18:46:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Proton](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Proton](https://discourse.getdbt.com/u/Proton)\
**Post date:** [December 13, 2022, 6:46pm UTC](https://discourse.getdbt.com/t/source-from-staging-output-to-dev/5592/1 "2022-12-13T18:46:47Z")

</div>

Is there anyway to build a model (`dbt run`) and have `ref` source from one schema for model relationships, but have the run output to a different schema? i.e. avoid having to build upstream models by just running against a staging schema that already has all the models built, but output the new model (and/or downstream models) to a dev schema.

---

<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:** [December 14, 2022, 12:39am UTC](https://discourse.getdbt.com/t/source-from-staging-output-to-dev/5592/2 "2022-12-14T00:39:40Z")

</div>

@Proton look into deferral - this should be exactly what you’re after! [Defer | dbt Developer Hub](https://docs.getdbt.com/reference/node-selection/defer)

For an example of this in the real world (in a CI context instead of a development context, but the behaviours are the same), check out [How we sped up our CI runs by 10x using Slim CI](https://discourse.getdbt.com/t/how-we-sped-up-our-ci-runs-by-10x-using-slim-ci/2603)

---

<div class="post-metadata">

**Author:** ![Proton](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Proton](https://discourse.getdbt.com/u/Proton)\
**Post date:** [December 14, 2022, 2:39pm UTC](https://discourse.getdbt.com/t/source-from-staging-output-to-dev/5592/3 "2022-12-14T14:39:45Z")

</div>

Yes, this is exactly what I was after. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/a7a7ca1fe379aaf90952b0e13118a817babcd14f.png) [@system](https://discourse.getdbt.com/u/system)\
**Post date:** [December 21, 2022, 2:40pm UTC](https://discourse.getdbt.com/t/source-from-staging-output-to-dev/5592/4 "2022-12-21T14:40:35Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
