From bc0dc73f54d3ac33d9aa7599cbb335ca10058900 Mon Sep 17 00:00:00 2001 From: McKnight-42 Date: Thu, 30 May 2024 10:10:26 -0500 Subject: [PATCH] init push arbitrary configs for generic tests pr --- core/dbt/parser/generic_test_builders.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/dbt/parser/generic_test_builders.py b/core/dbt/parser/generic_test_builders.py index 8a4864be82e..db32e1bab80 100644 --- a/core/dbt/parser/generic_test_builders.py +++ b/core/dbt/parser/generic_test_builders.py @@ -157,6 +157,21 @@ def __init__( self.config[key] = value if "config" in self.args: + for key, value in self.args["config"].items(): + if isinstance(value, str): + + try: + value = get_rendered(value, render_ctx, native=True) + except UndefinedMacroError as e: + + raise CustomMacroPopulatingConfigValueError( + target_name=self.target.name, + column_name=column_name, + name=self.name, + key=key, + err_msg=e.msg, + ) + self.config[key] = value del self.args["config"] if self.namespace is not None: