[Bug] Update comment_markdown
fields with coalesces so that Snowflake concatenation returns not null elements
#20
Labels
bug
Something isn't working
Is there an existing issue for this?
Describe the issue
Snowflake does not support concatenation on null elements. If any fields are being concatenated that are null, the resulting output of the concatenation is null. We will need to perform coalesce on all fields being concatenated so that it always returns a not null value.
Relevant error log or model output
The relevant code being impacted lies in our intermediate models, where the
dbt.concat
function is applied, sayint_rag_zendesk__ticket_comment_document
.If any one of these fields is null, say
commenter_email
, orcommenter_name
, then the output of thecomment_markdown
will also be null in Snowflake, regardless of any other not-null elements present.Expected behavior
When concatenated, the output of
comment_markdown
is any concatenation with not null elements are populated.Possible solution
We apply our
coalesce_cast
macro to all fields that are concatenated and create a not-null standardized value to be safe.dbt Project configurations
Standard
Package versions
packages:
version: [">=0.4.0", "<0.5.0"]
What database are you using dbt with?
snowflake
How are you running this dbt package?
dbt Core™
dbt Version
1.7.4
Additional Context
No response
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: