# dbt cloud - commands in script

**URL:** <https://discourse.getdbt.com/t/dbt-cloud-commands-in-script/5964>\
**Category:** Help\
**Tags:** jinja, dbt-cloud\
**Created:** [January 10, 2023, 2:09pm UTC](https://discourse.getdbt.com/t/dbt-cloud-commands-in-script/5964 "2023-01-10T14:09:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wojciech.nowicki](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/wojciech.nowicki/32/1588_2.png) [@wojciech.nowicki](https://discourse.getdbt.com/u/wojciech.nowicki)\
**Post date:** [January 10, 2023, 2:09pm UTC](https://discourse.getdbt.com/t/dbt-cloud-commands-in-script/5964/1 "2023-01-10T14:09:18Z")

</div>

Hi,

is there a possibility in dbt cloud to put some dbt commands into a script file (or macro?) and then execute it ?

e.g.

– dbt run-operation macro\_123  
– dbt run-operation macro\_123 --vars ‘unit\_test\_name: test\_no\_1’  
– dbt run-operation macro\_123 --vars ‘unit\_test\_name: test\_no\_2’

I want to gather all tests, and then run it always at once.

---

<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:** [January 11, 2023, 7:02am UTC](https://discourse.getdbt.com/t/dbt-cloud-commands-in-script/5964/2 "2023-01-11T07:02:16Z")

</div>

What code do you hope you can put inside of macro\_123? It is possible to set vars via the command line, but you can’t have a macro that calls other dbt command like run or test.

If you want to run dbt tests, why would you try to invoke an operation instead of just running dbt test directly?
