-
Notifications
You must be signed in to change notification settings - Fork 34
Feature/add union data #123
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
base: main
Are you sure you want to change the base?
Changes from all commits
63ecab2
b668a58
e35e9eb
9caf6ad
93ca4f3
ea142f4
4e390b5
0644b82
b6900a5
1f7cda8
c8c51da
7b2a5ca
7a37bb8
363527b
ad0c752
7ef069f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: 'auto release' | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - closed | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| call-workflow-passing-data: | ||
| if: github.event.pull_request.merged | ||
| uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,14 @@ with base as ( | |
| staging_columns=get_company_columns() | ||
| ) | ||
| }} | ||
|
|
||
| {{ | ||
| fivetran_utils.source_relation( | ||
| union_schema_variable='hubspot_union_schemas', | ||
| union_database_variable='hubspot_union_databases' | ||
| ) | ||
| }} | ||
|
|
||
| from base | ||
|
|
||
| ), fields as ( | ||
|
|
@@ -27,12 +35,20 @@ with base as ( | |
| staging_columns=get_company_columns() | ||
| ) | ||
| }} | ||
|
|
||
| {{ | ||
| fivetran_utils.source_relation( | ||
| union_schema_variable='hubspot_union_schemas', | ||
| union_database_variable='hubspot_union_databases' | ||
| ) | ||
| }} | ||
|
|
||
| {% 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'])) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain the need for this addition?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment applies to the other models with the similar code update.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah essentially we don't want to include without adding it to the |
||
| }} | ||
| {% endif %} | ||
| from base | ||
|
|
@@ -52,7 +68,8 @@ with base as ( | |
| city, | ||
| state, | ||
| country, | ||
| company_annual_revenue | ||
| company_annual_revenue, | ||
| source_relation | ||
|
|
||
| --The below macro adds the fields defined within your hubspot__ticket_pass_through_columns variable into the staging model | ||
| {{ fivetran_utils.fill_pass_through_columns('hubspot__company_pass_through_columns') }} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.