From dfc7564fe0e20249caf6b45c10597d341b269a11 Mon Sep 17 00:00:00 2001 From: Max Margalith <103057465+mxmarg@users.noreply.github.com> Date: Thu, 25 Jan 2024 01:53:34 +0100 Subject: [PATCH] fixed reflection bug https://github.com/dremio/dbt-dremio/issues/193 (#213) See issue description in https://github.com/dremio/dbt-dremio/issues/193 --- .../dremio/macros/materializations/reflection/reflection.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/dremio/macros/materializations/reflection/reflection.sql b/dbt/include/dremio/macros/materializations/reflection/reflection.sql index c510835..578a70f 100644 --- a/dbt/include/dremio/macros/materializations/reflection/reflection.sql +++ b/dbt/include/dremio/macros/materializations/reflection/reflection.sql @@ -27,7 +27,7 @@ limitations under the License.*/ {% if model.refs | length + model.sources | length == 1 %} {% if model.refs | length == 1 %} - {% set anchor = ref(model.refs[0][0]) %} + {% set anchor = ref(model.refs[0]['name']) %} {% else %} {% set anchor = source(model.sources[0][0], model.sources[0][1]) %} {% endif %}