dbt-sqlserver icon indicating copy to clipboard operation
dbt-sqlserver copied to clipboard

Warning! of breaking change on dbt-fabric

Open axellpadilla opened this issue 7 months ago • 0 comments

Around or before this change on upstream repo, was caused a breaking change: https://github.com/microsoft/dbt-fabric/pull/270

While this makes both adapters behave like the default dbt docs, and is good, it was indeed a breaking change, some database now will have duplicated tables and views, and even could have errors.

This is the default:

{% macro generate_schema_name(custom_schema_name, node) -%}

    {%- set default_schema = target.schema -%}
    {%- if custom_schema_name is none -%}

        {{ default_schema }}

    {%- else -%}

        {{ default_schema }}_{{ custom_schema_name | trim }}

    {%- endif -%}

{%- endmacro %}

This is what was probably removed in x change:

{% macro fabric__generate_schema_name(custom_schema_name, node) -%}

    {%- set default_schema = target.schema -%}
    {%- if custom_schema_name is none -%}

        {{ default_schema }}

    {%- else -%}

        {{ custom_schema_name | trim }}

    {%- endif -%}

{%- endmacro %}

This should be investigated further and documented so old version users know they need to have that macro overrided to preserve previous schema naming.

axellpadilla avatar Jun 23 '25 17:06 axellpadilla