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

set_sql_header and config.sql_header don't do anything.

Open hanstwins opened this issue 1 year ago • 4 comments

When attempting to add a SQL header, nothing is generated. (for reference: https://docs.getdbt.com/reference/resource-configs/sql_header )

{{ config(materialized='table') }}

{% call set_sql_header(config) %}
declare @temp float = 1.345;
{%- endcall %}

select * from MyTable where MyColumn = @temp

this also doesn't work:

{{ 
    config(
        materialized='table',
        sql_header="""
declare @temp float = 1.345;
""") 
}}

select * from MyTable where MyColumn = @temp

The compiled SQL looks like:

select * from MyTable where MyColumn = @temp

hanstwins avatar Sep 20 '24 16:09 hanstwins