-
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
Feature/add union data #123
base: main
Are you sure you want to change the base?
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-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.
.github/workflows/check_docs.yml
Outdated
name: 'check docs' | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
changed-files: | ||
runs-on: ubuntu-latest | ||
name: test changed-files | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: docs/** | ||
|
||
- name: Check to see if docs folder hasn't changed | ||
if: steps.changed-files.outputs.any_changed == 'false' | ||
run: | | ||
echo "Docs have not been regenerated." | ||
exit 1 | ||
|
||
- name: Check if docs folder has changed | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: | | ||
echo "Docs have been regenerated!" | ||
exit 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.
Let's actually remove this. We are planning on taking a new approach this year on docs checking and generation.
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.
removed
CHANGELOG.md
Outdated
|
||
## 🛠️ Under the Hood 🛠️ | ||
- Included auto-releaser GitHub Actions workflow to automate future releases. | ||
- Included Github Actions workflow to check for docs updates. |
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.
After removing the file we should also remove this entry.
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.
removed
README.md
Outdated
To properly incorporate all of your Hubspot connectors into your project's DAG: | ||
1. Define each of your sources in a `.yml` file in your project. Utilize the following template to leverage our table and column documentation. | ||
|
||
<details><summary><i>Expand for source configuration template</i></summary><p> |
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 like this idea, but I worry it is going to be a pain to maintain going forward. Is there any other way we can document this without explicitly showing the yml example like you have below?
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
{% if all_passthrough_column_check('stg_hubspot__company_tmp',get_company_columns()) > 0 %} | ||
-- just pass everything through if extra columns are present, but ensure required columns are present. | ||
,{{ | ||
fivetran_utils.remove_prefix_from_columns( | ||
columns=adapter.get_columns_in_relation(ref('stg_hubspot__company_tmp')), | ||
prefix='property_', exclude=get_macro_columns(get_company_columns())) | ||
prefix='property_', exclude=(get_macro_columns(get_company_columns()) + ['_dbt_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.
Can you explain the need for this addition?
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.
This comment applies to the other models with the similar code 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.
yeah essentially we don't want to include _dbt_source_relation
(which is created by union_data
/union_relation
) in the remove_prefix_from_columns
macro call.
without adding it to the exclude
list, users passing through all columns would end up with both a source_relation
and _dbt_source_relation
column, which is redundant and a lil confusing. thus, this change makes sure that these users just have the more-nicely-named source_relation
field.
# - package: fivetran/fivetran_utils | ||
# version: [">=0.4.0", "<0.5.0"] | ||
- git: https://github.com/fivetran/dbt_fivetran_utils.git | ||
revision: feature/enhance-union-data | ||
warn-unpinned: false | ||
|
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.
Reminder to swap before release
PR Overview
This PR will address the following Issue/Feature:
fivetran/dbt_hubspot#130
This PR will result in the following new package version:
v0.15.0
Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:
introduces support for running the package on a union of connectors
union_data
macro to each _tmp modelhubspot__pass_through_all_columns
is truedbt_hubspot_source v0.15.0
PR #123 includes the following updates:
🎉 Feature Update 🎉
🛠️ Under the Hood 🛠️
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
hubspot__pass_through_all_columns
values and specific passthrough columns withadd_property_label: true
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":
See Hex notebook validating transform models
Standard Updates
Please acknowledge that your PR contains the following standard updates:
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?
🇨🇱