From eb253b4563ee323162ab2fd1972541ba1d2259f0 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 26 Sep 2023 03:39:00 +0100 Subject: [PATCH] revert clever commit --- core/dbt/parser/schema_renderer.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/dbt/parser/schema_renderer.py b/core/dbt/parser/schema_renderer.py index 0ab7d622bf1..66b91fee1b4 100644 --- a/core/dbt/parser/schema_renderer.py +++ b/core/dbt/parser/schema_renderer.py @@ -34,7 +34,20 @@ def _is_norender_key(self, keypath: Keypath) -> bool: Return True if it's tests or description - those aren't rendered now because they're rendered later in parse_generic_tests or process_docs. """ - return keypath[-1] in ("tests", "description") + if len(keypath) >= 1 and keypath[0] in ("tests", "description"): + return True + + if len(keypath) == 2 and keypath[1] in ("tests", "description"): + return True + + if ( + len(keypath) >= 3 + and keypath[0] in ("columns", "dimensions", "measures", "entities") + and keypath[2] in ("tests", "description") + ): + return True + + return False # don't render descriptions or test keyword arguments def should_render_keypath(self, keypath: Keypath) -> bool: