Storing vars outside of dbt_project.yml

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.

No its not possible to split dbt_project.yml file

If you have lot of varibles u can store them in a json file and pass them to the dbt command using cat command

Example:- dbt run --vars $(cat folder/json_file.json)

Please upvote Defining vars, folder-level configs outside dbt_project.yml · Issue #2955 · dbt-labs/dbt-core · GitHub

And also note that in the discussion on that issue there’s a couple of workarounds listed which might help you

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