Error:-
split(
06:34:30 thread_id,
06:34:30
06:34:30
06:34:30 – escape if starts with a special character
06:34:30 case when regexp_extract(‘-’, ‘([^A-Za-z0-9])(.*)’, 1) != ‘_’
06:34:30 -------------^^^
06:34:30 then concat('', ‘-’)
06:34:30 else ‘-’ end
06:34:30
06:34:30
06:34:30 )[(1)]
What you have linked to is the default implementation of split_part() which will be used in the absence of an overriding implementation (either from the adapter or project). I don’t see an overriding implementation in the dbt-glue code.
How are you invoking {{ dbt.split_part() }}? Does the compiled SQL script of your model contain valid syntax for your Glue database platform?
If you want to override the behavior of the split_part() macro, you just need to create a macro glue__split_part() in your project. (and maybe update your dispatch configuration)
Thanks for your replies.
From the error message, I see that the default implementation of split_part is calling split()
I want to override the way escaping is happening in my glue__split_part macro. However for that I want to obtain the default implementation of split_part.
This one https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/include/global_project/macros/utils/split_part.sql
doesn’t contain the call to split. Hence I am confused