# Passing project variable as argument for macro

**URL:** <https://discourse.getdbt.com/t/passing-project-variable-as-argument-for-macro/11860>\
**Category:** Help\
**Tags:** snowflake, dbt-cloud\
**Created:** [February 2, 2024, 7:40am UTC](https://discourse.getdbt.com/t/passing-project-variable-as-argument-for-macro/11860 "2024-02-02T07:40:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akanksha](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@akanksha](https://discourse.getdbt.com/u/akanksha)\
**Post date:** [February 2, 2024, 7:40am UTC](https://discourse.getdbt.com/t/passing-project-variable-as-argument-for-macro/11860/1 "2024-02-02T07:40:49Z")

</div>

## The problem I’m having

Hi,  
I am trying to run a macro by passing the parameter as run time.  
Can I refer project variables as parameter

## What I’ve already tried

dbt run-operation stream\_creation\_vault\_test --args ‘{ “tbl\_nm”: {{var(“LOAD\_OFFER”)}} , “initial\_rows”: false}’

## Some example code or error messages

Error: Invalid value for ‘–args’: String ‘{ “tbl\_nm”: {{var(“LOAD\_OFFER”)}} , “initial\_rows”: false}’ is not valid YAML

---

<div class="post-metadata">

**Author:** ![hvignolo](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/hvignolo/32/3605_2.png) [@hvignolo](https://discourse.getdbt.com/u/hvignolo)\
**Post date:** [February 8, 2024, 8:15pm UTC](https://discourse.getdbt.com/t/passing-project-variable-as-argument-for-macro/11860/2 "2024-02-08T20:15:25Z")

</div>

Hi @akanksha,

You can use your variable directly into the macro, and avoid passing it as an option in the CLI. Does this make sense in your case?
