-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add new category field #132
Conversation
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 this PR. I have a few comments and suggestions before this is ready for approval. Great to see the customer mentioned this addressed the immediate issue in the linked bug report!
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.
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.
Looked into this. property_hs_createdate
doesn't exist in our engagement_meeting
seed data so I removed it from the config.
But I saw some like the below:
And I couldn't figure out where the error was coming from because I don't see property_hs_createdate
being referenced for email_event_spam_report_data
anywhere...
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.
LGTM just one note to address before moving to release review. No reason to block initial approval.
macros/get_merged_deal_columns.sql
Outdated
@@ -3,7 +3,8 @@ | |||
{% set columns = [ | |||
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, | |||
{"name": "deal_id", "datatype": dbt.type_int()}, | |||
{"name": "merged_deal_id", "datatype": dbt.type_int()} | |||
{"name": "merged_deal_id", "datatype": dbt.type_int()}, | |||
{"name": "category", "datatype": dbt.type_string()} |
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.
Category is not included in merged_deal so we should remove here as well
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 for catching!
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 Had a few questions!
- Introduced a new `category` column to the below models. This association field differentiates records by either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label) and was introduced to the Hubspot connector in October 2024. See the [connector release notes](https://fivetran.com/docs/connectors/applications/hubspot/changelog#october2024) for more. | ||
- `stg_hubspot__deal_company` | ||
- `stg_hubspot__deal_contact` | ||
- `stg_hubspot__engagement_company` |
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 I do not see the category
column added to any of the models from lines 7-13. Was the intention to add category
to these models, or should these lines be removed?
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.
Great question! So these models leverage a macro to bring through all the columns and therefore the category
field was not explicitly called out in them, thus the models themselves didn't require any changes. But you can see that the new field gets brought through after running the package.
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.
Ah makes sense! Thanks for that.
CHANGELOG.md
Outdated
|
||
## Under the Hood | ||
- Updated the respective seed files, `get_[source_table]_column` macros, and documentation of the mentioned models to include the `category` field. | ||
- Added explicit casting of `pipeline_id` to string in `stg_hubspot__deal_pipeline_stage` to ensure successful downstream joins. |
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 If this could potentially change the data type, wouldn't this be a breaking 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, moved to the Breaking Change section
@@ -1,3 +1,26 @@ | |||
# dbt_hubspot_source v0.17.0 |
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.
Could you bump the README version up to [">=0.17.0", "<0.18.0"]?
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.
thank you!
@@ -146,8 +147,6 @@ seeds: | |||
+column_types: | |||
engagement_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}" | |||
_fivetran_synced: timestamp | |||
property_hs_createdate: timestamp |
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.
was there a reason this casting was removed for these fields? it wasn't called out in the CHANGELOG.
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.
Yeah I had realized that these fields were not existent in the seed data and therefore not necessary. I'll call this out in the Under the Hood section too
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 One small suggestion but after Buildkite passes you're good to merge!
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
PR Overview
This PR will address the following Issue/Feature:
#131 , and internal ticket
This PR will result in the following new package version:
v0.17.0
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
Breaking Change
Introduced a new
category
column to the below models. This association field differentiates records by either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label) and was introduced to the connector in October 2024.stg_hubspot__deal_company
stg_hubspot__deal_contact
stg_hubspot__merged_deal
stg_hubspot__engagement_company
stg_hubspot__engagement_contact
stg_hubspot__engagement_deal
stg_hubspot__ticket_company
stg_hubspot__ticket_contact
stg_hubspot__ticket_deal
stg_hubspot__ticket_engagement
The
category
field which will be a part of the uniqueness tests for the following models:stg_hubspot__deal_contact
stg_hubspot__deal_company
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:
Will have customer confirm this branch allows their tests to pass.
If you had to summarize this PR in an emoji, which would it be?
💃