fivetran / dbt_hubspot_source

Data models for Hubspot built using dbt.
https://fivetran.github.io/dbt_hubspot_source/
Apache License 2.0
31 stars 30 forks source link

hotfix/pass-through-all-columns #100

Closed fivetran-joemarkiewicz closed 1 year ago

fivetran-joemarkiewicz commented 1 year ago

PR Overview

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

This PR will result in the following new package version: v0.9.0

This is not a breaking change in particular, but will be batched with PR #98 which is a breaking change. **Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:** This PR includes the following changes: - Addition of the `get_columns_macro.sql` macro that will be used when users define the `hubspot__pass_through_all_columns` variable to `true`. - The macro is designed to leverage the respective "get_[table]_columns" macro for the relevant models to return a list of strings of all columns in the macro. - This macro is required to ensure customers using the `hubspot__pass_through_all_columns: true` config will have all the required columns that are necessary for downstream transformations while also bringing in all the fields from their source. - Updates to the `CONTACT`, `COMPANY`, `DEAL`, and `TICKET` staging models to ensure all required columns are included when a user defines the `hubspot__pass_through_all_columns` variable as true. - In order for the above to be successful, additional changes were required in the respective "get_[table]_columns" macros to alias the fields. This ensures consistency regardless of using the `hubspot__pass_through_all_columns` variable as defined as true or false. ## PR Checklist ### Basic Validation Please acknowledge that you have successfully performed the following commands locally: - [X] dbt compile - [X] dbt run –full-refresh - [X] dbt run - [X] dbt test - [X] dbt run –vars (if applicable) Before marking this PR as “ready for review” the following have been applied: - [X] The appropriate issue has been linked and tagged - [X] You are assigned to the corresponding issue and this PR - [x] 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”: - [X] You have validated these changes and assure this PR will address the respective Issue/Feature. - [X] You are reasonably confident these changes will not impact any other components of this package or any dependent packages. - [X] You have provided details below around the validation steps performed to gain confidence in these changes. I validated that these fields returned appropriately using both the `hubspot__pass_through_all_columns` variable being set to true and false. Additionally, I was able to confirm that both variable declarations worked when paired with the downstream transformation. Additionally, I was able to validate that without these changes, the accompanying PR #98 fails if `hubspot__pass_through_all_columns` is defined as true. However, it is resolved with these changes. See corresponding height ticket for more validation details. ### Standard Updates Please acknowledge that your PR contains the following standard updates: - Package versioning has been appropriately indexed in the following locations: - [X] indexed within dbt_project.yml - [X] indexed within integration_tests/dbt_project.yml - [X] CHANGELOG has individual entries for each respective change in this PR

dbt Docs

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

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

🎣