The problem I’m having
I am stuck on an error. I want to generate surrogate key but keep getting the error below.
select {{ dbt_utils.generate_surrogate_key(
['date',
'user_id',
'type']
) }} as contribution_id,
....
What is wrong with my query?
What I’ve already tried
I originally was using dbt_utils.surrogate_key()
but noticed that it is the older version.
I also added this var in dbt_project.yaml
:
surrogate_key_treat_nulls_as_empty_strings: true #turn on legacy behaviour
But nothing worked.
Some example code or error messages
Compilation Error in model dau (models/dau.sql)
macro 'dbt_macro__default__surrogate_key' takes not more than 1 argument(s)