# How to pass the variables in the json file to ---vars argument

**URL:** <https://discourse.getdbt.com/t/how-to-pass-the-variables-in-the-json-file-to-vars-argument/7548>\
**Category:** Help\
**Created:** [March 29, 2023, 2:11pm UTC](https://discourse.getdbt.com/t/how-to-pass-the-variables-in-the-json-file-to-vars-argument/7548 "2023-03-29T14:11:35Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [March 29, 2023, 2:11pm UTC](https://discourse.getdbt.com/t/how-to-pass-the-variables-in-the-json-file-to-vars-argument/7548/1 "2023-03-29T14:11:35Z")

</div>

I have a lot of variables defined in a json file, i wanna pass them to --vars argument. how can i do that?

I have tried the below command but its giving me an error  
` dbt run --vars $(cat folder/json_file.json)`

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [March 29, 2023, 2:26pm UTC](https://discourse.getdbt.com/t/how-to-pass-the-variables-in-the-json-file-to-vars-argument/7548/2 "2023-03-29T14:26:23Z")

</div>

Try debug what happens is you pass that to a simple echo, and see if it shows what you expect. any sorts of unexpected characters can break the flow, so this could very be a data input problem, and the command is just fine

Note: `@willem.hendriks` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1680099974577789?thread_ts=1680099124.177309&cid=CBSQTAPLG). It might not have transferred perfectly.

---

<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:** [June 17, 2023, 6:34pm UTC](https://discourse.getdbt.com/t/how-to-pass-the-variables-in-the-json-file-to-vars-argument/7548/3 "2023-06-17T18:34:09Z")

</div>

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