From 4050e377ec01c2f14dd9600fe704ddb34adb66fa Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Tue, 26 Nov 2024 15:37:26 -0600 Subject: [PATCH] Exclude `previous_batch_results` from serialization of model node to avoid jinja context bloat --- core/dbt/contracts/graph/nodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/dbt/contracts/graph/nodes.py b/core/dbt/contracts/graph/nodes.py index 94aa117df77..0eaf758ae5a 100644 --- a/core/dbt/contracts/graph/nodes.py +++ b/core/dbt/contracts/graph/nodes.py @@ -451,6 +451,8 @@ def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None): dct = super().__post_serialize__(dct, context) if "_has_this" in dct: del dct["_has_this"] + if "previous_batch_results" in dct: + del dct["previous_batch_results"] return dct @classmethod