update custom name macro for dbt 1.8.6 changes

This commit is contained in:
mattromano 2025-12-31 11:23:52 -08:00
parent 34d1f2f7a0
commit b87c064abc

View File

@ -7,5 +7,9 @@
{% macro generate_alias_name(custom_alias_name=none, node=none) -%}
{% set node_name = node.name %}
{% set split_name = node_name.split('__') %}
{{ split_name[1] | trim }}
{%- if split_name | length > 1 -%}
{{ split_name[1] | trim }}
{%- else -%}
{{ node_name | trim }}
{%- endif -%}
{%- endmacro %}