From e79f21b42c8dd80d16b98693368366299855691a Mon Sep 17 00:00:00 2001 From: David Baussart Date: Fri, 15 Sep 2023 18:18:58 +0200 Subject: [PATCH] Load template from dbt_invoke_template.yml --- dbt_invoke/internal/_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbt_invoke/internal/_utils.py b/dbt_invoke/internal/_utils.py index 7f69a7e..d66d1b6 100644 --- a/dbt_invoke/internal/_utils.py +++ b/dbt_invoke/internal/_utils.py @@ -132,6 +132,10 @@ def get_project_info(ctx, project_dir=None): Path(project_path, macro_path) for macro_path in project_yml.get('macro-paths', ['macros']) ] + # retrieves template information if provided + template_path = Path(project_path, 'dbt_invoke_template.yml') + if template_path.exists(): + ctx.config['template_yml'] = parse_yaml(template_path) # Set context config key-value pairs ctx.config['project_path'] = project_path ctx.config['project_name'] = project_name