I just did a dbt upgrade from v.1.0 → v1.3 and also upgraded all dependencies, packages along with it as things were breaking. I’m facing a recurring problem in “dbt seed” and macros in each run - where a surrogate key function is failing repeatedly
Need to fix this so upgrade goes smoothly
Error:-
dbt seed
10:26:16 Running with dbt=1.3.2
10:26:16 Partial parse save file not found. Starting full parse.
Compilation Error in model website_sessionized (models/marts/marketing/attribution/website_sessionized.sql)
Warning: `dbt_utils.surrogate_key` has been replaced by `dbt_utils.generate_surrogate_key`. The new macro treats null values differently to empty strings. To restore the behaviour of the original macro, add a global variable in dbt_project.yml called `surrogate_key_treat_nulls_as_empty_strings` to your dbt_project.yml file with a value of True. The vauld_analytics.website_sessionized model triggered this warning.
What I’ve already tried
Previous code :-
{{ dbt_utils.surrogate_key(['anonymous_id', 'session_number']) }} AS session_id
New code :-
{{ dbt_utils.generate_surrogate_key(['anonymous_id', 'session_number']) }} AS session_id #
Also, tried adding the global variable in project.yml
#1.3 v fix
#surrogate_key_treat_nulls_as_empty_strings: true - not working
Not sure what’s the solution here to add the new command for surrogate key - any help is appreciated