# Storing vars outside of dbt\_project.yml

**URL:** <https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412>\
**Category:** Help\
**Tags:** vars\
**Created:** [May 24, 2023, 8:08am UTC](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412 "2023-05-24T08:08:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![moseleyi](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@moseleyi](https://discourse.getdbt.com/u/moseleyi)\
**Post date:** [May 24, 2023, 8:08am UTC](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412/1 "2023-05-24T08:08:55Z")

</div>

Is there a way to split `dbt_project.yml` file? I need to use a lot of `vars` for external packages and I would like to keep it in a separate file.

---

<div class="post-metadata">

**Author:** ![Surya](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/surya/32/3763_2.png) [@Surya](https://discourse.getdbt.com/u/Surya)\
**Post date:** [May 25, 2023, 9:07am UTC](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412/2 "2023-05-25T09:07:31Z")

</div>

No its not possible to split `dbt_project.yml` file

---

<div class="post-metadata">

**Author:** ![Surya](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/surya/32/3763_2.png) [@Surya](https://discourse.getdbt.com/u/Surya)\
**Post date:** [June 18, 2023, 9:39am UTC](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412/3 "2023-06-18T09:39:41Z")

</div>

If you have lot of varibles u can store them in a json file and pass them to the dbt command using cat command

Example:- `dbt run --vars $(cat folder/json_file.json)`

---

<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:** [June 21, 2023, 5:31pm UTC](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412/4 "2023-06-21T17:31:21Z")

</div>

Please upvote [Defining vars, folder-level configs outside dbt\_project.yml · Issue #2955 · dbt-labs/dbt-core · GitHub](https://github.com/dbt-labs/dbt-core/issues/2955)

And also note that in the discussion on that issue there’s a couple of workarounds listed which might help you

---

<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:** [July 6, 2023, 11:45am UTC](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412/5 "2023-07-06T11:45:25Z")

</div>

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