Skip to content
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

Feature/add union data #133

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Feature/add union data #133

wants to merge 13 commits into from

Conversation

fivetran-jamie
Copy link
Collaborator

@fivetran-jamie fivetran-jamie commented Jan 9, 2024

PR Overview

This PR will address the following Issue/Feature:
#130

This PR will result in the following new package version:

v0.16.0

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

  • includes source_relation in every:
    • join
    • window function partition
    • generated surrogate key
    • model uniqueness test
  • documents unioning ability in README
  • adds yml docs for source_relation
  • adds some missing documentation that was in the source README but not the transform
  • kinda by accident included changes from update hubspot_deal_changes description #132, which might be merged to main prior to this PR

dbt_hubspot v0.16.0

🎉 Feature Update 🎉

  • This release supports running the package on multiple Hubspot sources at once! See the README for details on how to leverage this feature (PR #133).

📝 Documentation 📝

  • Included documentation around dbt-core versions and disabling source freshness tests. Previously, we included this in the source package README but had missed the transform README (PR #133).
  • Tweaked the description of hubspot__deal_changes to better reflect the grain of the model (PR #132).

🛠️ Under the Hood 🛠️

  • Updated the maintainer PR template to resemble the most up to date format.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt compile
  • dbt run –full-refresh
  • dbt run
  • dbt test
  • dbt run –vars (if applicable) different permutations of passthrough columns -- ran with diff hubspot__pass_through_all_columns values and specific passthrough columns with add_property_label: true

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.

See Hex notebook linked in Height

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • README updates have been applied (if applicable)
  • DECISIONLOG updates have been updated (if applicable)
  • Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • docs were regenerated (unless this PR does not include any code or yml updates) - post approval

If you had to summarize this PR in an emoji, which would it be?

🍨

@fivetran-jamie fivetran-jamie self-assigned this Jan 9, 2024
@fivetran-jamie fivetran-jamie marked this pull request as ready for review January 10, 2024 19:06
…ithub/workflows/tj-actions/changed-files-41.0.0

Bump tj-actions/changed-files from 29.0.4 to 41.0.0 in /.github/workflows
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie the results of this PR look great! I just have a few questions and suggestions in the comments below that I would like your eyes on before we approve this. Let me know if you have any questions or want to chat about these further.

@@ -18,7 +18,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v29.0.4
uses: tj-actions/changed-files@v41.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this as we will use a different docs check this year

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed and added note about removal to the changelog

README.md Outdated

<details><summary><i>Expand for source configuration template</i></summary><p>

> **Note**: If there are source tables you do not have (see [Step 4](https://github.com/fivetran/dbt_hubspot_source?tab=readme-ov-file#step-4-disable-models-for-non-existent-sources)), you may still include them here, as long as you have set the right variables to `False`. Otherwise, you may remove them from your source definition.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about if there is a more concise and manageable option for sharing this information with the users.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

README.md Outdated
@@ -150,7 +1444,12 @@ vars:
hubspot_service_enabled: true # Enables all service/ticket models. Default = false
hubspot_ticket_deal_enabled: true # Default = false
```

### Dbt-core Version Requirement for disabling freshness tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to include the proper reference to dbt when mentioning it within our docs.

Suggested change
### Dbt-core Version Requirement for disabling freshness tests
### dbt Core™ Version Requirement for disabling freshness tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it wholly

# dbt_hubspot v0.16.0

## 🎉 Feature Update 🎉
- This release supports running the package on multiple Hubspot sources at once! See the [README](https://github.com/fivetran/dbt_hubspot?tab=readme-ov-file#step-3-define-database-and-schema-variables) for details on how to leverage this feature ([PR #133](https://github.com/fivetran/dbt_hubspot/pull/133)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is also very relevant to include here that customers will not also see a new source_relation field in their end models.

Additionally, we should flag that customers using the ticket models will need to run a full refresh to capture the new schema change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@@ -9,13 +9,13 @@
file_format = 'parquet'
)
}}

-- depends_on: {{ ref('stg_hubspot__ticket') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry this will now cause compilation errors for customers who try to run dbt compile when first trying to use the package.

What is the limitation of ensuring this model still references the source?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll add the same check i just added to zendesk so that non-unioning users will still use the source

Comment on lines +2 to +6
# - package: fivetran/hubspot_source
# version: [">=0.15.0", "<0.16.0"]
- git: https://github.com/fivetran/dbt_hubspot_source.git
revision: feature/add-union-data
warn-unpinned: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to update before merge.

README.md Outdated
@@ -150,7 +1444,12 @@ vars:
hubspot_service_enabled: true # Enables all service/ticket models. Default = false
hubspot_ticket_deal_enabled: true # Default = false
```

### Dbt-core Version Requirement for disabling freshness tests
If you are not using a source table that involves freshness tests, please be aware that the feature to disable freshness was only introduced in dbt-core 1.1.0. Therefore ensure the dbt version you're using is v1.1.0 or greater for this config to work.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I just realized this package requires the use of dbt v1.3.0 or higher. So I think we may be able to remove this messaging in both the source and transform.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants