# \#vars

**URL:** https://discourse.getdbt.com/tag/vars/84.md

[Latest](https://discourse.getdbt.com/latest.md) · [Categories](https://discourse.getdbt.com/categories.md) · [Tags](https://discourse.getdbt.com/tags.md)

---

## [Confused with cli --vars syntax](https://discourse.getdbt.com/t/confused-with-cli-vars-syntax/12355)

<div class="topic-metadata">

**Author:** [@reyfabian2015](https://discourse.getdbt.com/u/reyfabian2015)\
**Replies:** 3\
**Last updated:** [June 2, 2025, 10:04pm UTC](https://discourse.getdbt.com/t/confused-with-cli-vars-syntax/12355 "2025-06-02T22:04:49Z")

</div>

The problem I’m having Using the syntax for --vars as indicated in the documentation causes an error. What I’ve already tried this is the command I ran in the cli. dbt ls --select Default\_Mig\_Date --vars '{"mig\_date":"…

---

## [Variable Scope - Overriding Package and Sub-Package Variables](https://discourse.getdbt.com/t/variable-scope-overriding-package-and-sub-package-variables/18720)

<div class="topic-metadata">

**Author:** [@64StarFox64](https://discourse.getdbt.com/u/64StarFox64)\
**Replies:** 0\
**Last updated:** [March 20, 2025, 5:27am UTC](https://discourse.getdbt.com/t/variable-scope-overriding-package-and-sub-package-variables/18720 "2025-03-20T05:27:20Z")

</div>

The problem I’m having I cannot seem to pass variables “up” to my packages when those variables are consumed in the package’s dbt\_project.yml file. I can’t do this even when invoking dbt run --vars '{"some\_package\_variab…

---

## [Nesting of vars in dbt\_project.yml](https://discourse.getdbt.com/t/nesting-of-vars-in-dbt-project-yml/14144)

<div class="topic-metadata">

**Author:** [@Ximlab](https://discourse.getdbt.com/u/Ximlab)\
**Replies:** 2\
**Last updated:** [July 10, 2024, 1:13pm UTC](https://discourse.getdbt.com/t/nesting-of-vars-in-dbt-project-yml/14144 "2024-07-10T13:13:13Z")

</div>

Hello, I’m unable to access directly indented variables in my models, that are defined in the vars from project.yml. vars: topic\_group: var\_in\_topic\_1: value\_1 var\_in\_topic\_2: value\_2 I’d like to be able to …

---

## [passing --vars in command line is not working](https://discourse.getdbt.com/t/passing-vars-in-command-line-is-not-working/10700)

<div class="topic-metadata">

**Author:** [@pavandivve](https://discourse.getdbt.com/u/pavandivve)\
**Replies:** 1\
**Last updated:** [November 8, 2023, 8:49pm UTC](https://discourse.getdbt.com/t/passing-vars-in-command-line-is-not-working/10700 "2023-11-08T20:49:40Z")

</div>

Prob: Project variable is not getting overwritten when I pass it through command line As shown in below screen env variable is set to dev in project.yml file. but i ran below command to overwrite variable. but in the o…

---

## [Storing vars outside of dbt\_project.yml](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412)

<div class="topic-metadata">

**Author:** [@moseleyi](https://discourse.getdbt.com/u/moseleyi)\
**Replies:** 3\
**Last updated:** [June 21, 2023, 5:31pm UTC](https://discourse.getdbt.com/t/storing-vars-outside-of-dbt-project-yml/8412 "2023-06-21T17:31:21Z")

</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.

---

## [Using of vars in Hooks Query](https://discourse.getdbt.com/t/using-of-vars-in-hooks-query/5366)

<div class="topic-metadata">

**Author:** [@minhajpasha](https://discourse.getdbt.com/u/minhajpasha)\
**Replies:** 3\
**Last updated:** [March 26, 2023, 6:00am UTC](https://discourse.getdbt.com/t/using-of-vars-in-hooks-query/5366 "2023-03-26T06:00:39Z")

</div>

Hello All Can we use vars in Hooks query? Iam trying to run below dbt command and it’s fails with below error: e\[0m16:47:20.468451 \[error\] \[MainThread\]: e\[33mObject of type date is not JSON serializablee\[0m dbt comma…
