diff --git a/cosmos/operators/base.py b/cosmos/operators/base.py index 2072cf22d..62d830116 100644 --- a/cosmos/operators/base.py +++ b/cosmos/operators/base.py @@ -236,5 +236,7 @@ def build_cmd( return dbt_cmd, env def pre_execute(self, context: Any): - context["model_config"] = self.extra_context + if self.extra_context: + logger.info("Extra context passed to operator, injecting into TaskInstance") + context["model_config"] = self.extra_context return super().pre_execute(context)