[Bug] Fix concatenation issue with null values creating null rows in Snowflake #19
+274
−308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Overview
This PR will address the following Issue/Feature: [#20]
This PR will result in the following new package version: v0.1.0-a6
This ensures null fields gets populated but shouldn't change the schema.
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
Bug Fixes (requires
--full-refresh
)coalesce_cast
macro to all relevant fields that are being concatenated intocomment_markdown
, as any concatenation in Snowflake with a null value returns null. We coalesced 'UNKNOWN' on a string field, and '1970-01-01 00:00:00' on a timestamp field to ensure Snowflake returns chunks of texts for all comments with null components.int_rag_hubspot__deal_comment_document
:email_title
andbody
(string fields),comment_time
(timestamp field).int_rag_hubspot__deal_document
:title
(string field) andcreated_on
(timestamp field).int_rag_jira__issue_comment_document
:comment_body
(string field) andcomment_time
(timestamp field).int_rag_jira__issue_document
:title
(string field) andcreated_on
(timestamp field).int_rag_zendesk__ticket_comment_document
:comment_body
(string field) andcomment_time
(timestamp field).int_rag_zendesk__ticket_document
:title
(string field) andcreated_on
(timestamp field).default_variable
instg_rag_hubspot__engagement_email
andstg_rag_hubspot__engagement_note
.engagement_deal
is the base in theint_rag_hubspot__deal_comment_document
CTEs.Under the Hood
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
Was able to reproduce the issue in Snowflake by running the compiled code with a null value that is concatenated and it returning nulls there. Adding the coalesces with the compiled code did produce the full row span expected.
The lone validation test worked too.
If you had to summarize this PR in an emoji, which would it be?
🪹