-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce the hubspot engagement table to adjust the joins in int_hub… #13
base: main
Are you sure you want to change the base?
Conversation
…spot__deal_document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I realized that now that engagement
exists and the field engagement_type
is available in that table, do we still need the coalesce between "engagement_emails.engagement_type", "engagement_notes.engagement_type"
here
{{ unified_rag.coalesce_cast(["engagement_emails.engagement_type", "engagement_notes.engagement_type", "'UNKNOWN'"], dbt.type_string()) }} as engagement_type, |
in order to grab engagement_type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update-- have since removed the previous "engagement_emails.engagement_type", "engagement_notes.engagement_type"
to swap with engagement.engagement_type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-reneeli thanks for working through these changes. I have a few comments to be addressed before approval. Let me know if you have any questions. Thanks!
CHANGELOG.md
Outdated
## Under the Hood | ||
- Updated the unique key in `rag__unified_document` to include `chunk_index`. Previously, the unique key was a combination of only `document_id`, `platform`, and `source_relation`, which was potentially inaccurate if there were multiple chunks associated with a document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend we classify this as a bug fix instead of an under the hood change. This will have an effect on customer data and we should classify it more than an under the hood change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-reneeli approved with just a two small requests before moving to release review.
Co-authored-by: Joe Markiewicz <[email protected]>
Co-authored-by: Joe Markiewicz <[email protected]>
Co-authored-by: Joe Markiewicz <[email protected]>
@@ -0,0 +1,2 @@ | |||
id,type,_fivetran_synced,portal_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason only a subset of seed columns are being run and tested here? Can we add all the relevant columns brought into the staging model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a great point. i initially mocked this up from the internal schema with the new version of tables that i was testing with. I added in the rest of the columns!
The ID of the engagement's owner. | ||
|
||
PLEASE NOTE - This field will only be populated for pre HubSpot v3 API versions. This field is only included to allow for backwards compatibility between HubSpot API versions. This field will be deprecated in the near future. | ||
- name: portal_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to document source_relation
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-reneeli Thanks for the PR! A few comments and a question about the seed file before approving.
Co-authored-by: Avinash Kunnath <[email protected]>
Co-authored-by: Avinash Kunnath <[email protected]>
Co-authored-by: Avinash Kunnath <[email protected]>
Thanks @fivetran-avinash ! Addressed comments. Also, I noticed that I didn't update the hubspot seed data with the new |
- Updated the `unique_id` in `rag__unified_document` to include `chunk_index`. Previously, the unique key was a combination of only `document_id`, `platform`, and `source_relation`, which was potentially inaccurate if there were multiple chunks associated with a document. | ||
|
||
## Under the Hood | ||
- Updated the *hubspot_x* seed data and *get_hubspot_x_columns* macros with the new `category` field where relevant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Updated the *hubspot_x* seed data and *get_hubspot_x_columns* macros with the new `category` field where relevant. | |
- Updated the `hubspot_*` seed data and `get_hubspot_*_columns` macros with the new `category` field where relevant. |
Small suggestion update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @fivetran-reneeli for doing this quick review!
Good call out on adding category
to the relevant seed files. However, I noticed category
is not being brought into the staging models, and we need to account for the joins in int_rag_hubspot__deal_document
, as was discussed in [#10] (I presume it's part of this PR since it's linked to the issue). Sorry for not catching this in the first go-around.
@fivetran-joemarkiewicz Let's discuss Monday if we want to try and fold these changes back in this sprint or just release as is.
PR Overview
This PR will address the following Issue/Feature: #11 #10 #12
This PR will result in the following new package version:
v0.1.0-a4
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
Breaking Changes
engagement
table to the package and made the following updates:stg_rag_hubspot__engagement
model as part of the hubspot staging models.int_rag_hubspot__deal_document
to adjust the method thathubspot_engagement_*
models are joined by leveraging thehubspot__engagement
table as the intermediary joining table for theengagement_contact
andengagement_company
tables.int_rag_hubspot__deal_document
to retrieveengagement_type
from the hubspotengagement
table as opposed to theengagement_emails
andengagement_notes
tables. As such, removes their respective references as they are no longer used in this model.Under the Hood
rag__unified_document
to includechunk_index
. Previously, the unique key was a combination of onlydocument_id
,platform
, andsource_relation
, which was potentially inaccurate if there were multiple chunks associated with a document.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:
If you had to summarize this PR in an emoji, which would it be?
💃