From 83ce993f308f0263b430dbc5ffbed9ff6a3fa9cb Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Fri, 9 Aug 2024 13:45:58 -0500 Subject: [PATCH] Fix add_ephemeral_prefix to identifier instead of name --- core/dbt/compilation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/dbt/compilation.py b/core/dbt/compilation.py index 90ccc42c479..2a32ac86fb7 100644 --- a/core/dbt/compilation.py +++ b/core/dbt/compilation.py @@ -375,7 +375,7 @@ def _recursively_prepend_ctes( _extend_prepended_ctes(prepended_ctes, new_prepended_ctes) - new_cte_name = self.add_ephemeral_prefix(cte_model.name) + new_cte_name = self.add_ephemeral_prefix(cte_model.identifier) rendered_sql = cte_model._pre_injected_sql or cte_model.compiled_code sql = f" {new_cte_name} as (\n{rendered_sql}\n)"