Hi!
I’m upgrading dbt from 1.2.1 to 1.5.0 and I am having issues building my models.
The adapter we use is bigquery (also updated the adapter) and we use a macro to build the different schemas we need.
After the update when I do a build or run command the macro is failing with the following error:
Compilation Error
macro 'dbt_macro__create_schema' takes no keyword argument 'relation'
This is the macro that finds and calls the bigquery create schema macro:
{%- macro create_schema(schema, environment, pull_request, salt, description, expiration=1) -%}
{{ return(adapter.dispatch('create_schema')(schema, environment, pull_request, salt, description, expiration)) }}
{%- endmacro -%}
This is the macro for creating a schema in bigquery:
{%- macro bigquery__create_schema(schema, environment, pull_request, salt, description, expiration) -%}
{%- do log("[\33[34mEXECUTION\33[0m] Creating schema " ~ schema, info = true) -%}
{%- if description is none -%}
{%- set description = "na" -%}
{%- endif -%}
{%- set ddl -%}
CREATE SCHEMA IF NOT EXISTS `{{ schema }}`
OPTIONS (
description = "{{ description }}",
location = "us",
default_table_expiration_days = {{ expiration }},
labels = [
("environment" , "{{ environment }}"),
("pull-request" , "{{ pull_request }}"),
("salt" , "{{ salt }}")
]
)
{%- endset -%}
{%- do run_query(ddl) -%}
{%- do log("[\033[32mSUCCESS\33[0m] Schema created", info = true) -%}
{%- endmacro -%}
As you can see from the macros, no keyword argument ‘relation’ si needed so I don’t understand why it’s saying I’m passing that keyword.
Any help is appreciated.