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

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)

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. It might not have transferred perfectly.

1 Like