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

Model HubSpot Service Hub tables #28

Merged
merged 4 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hubspot (Source)

This package models Hubspot data from [Fivetran's connector](https://fivetran.com/docs/applications/hubspot). It uses data in the format described by the [marketing](https://docs.google.com/presentation/d/1hrPp310SNK2qyESCV_g_JFx_Knm1MwB467wN3dEgy0M/edit#slide=id.g244d368397_0_1) and [sales](https://docs.google.com/presentation/d/1KABQnt8WmtZe7u5l7WFUoPIsWzv63P9gsWF79XGLoZE/edit#slide=id.g244d368397_0_1) ERDs.
This package models Hubspot data from [Fivetran's connector](https://fivetran.com/docs/applications/hubspot). It uses data in the format described by the [marketing](https://docs.google.com/presentation/d/1hrPp310SNK2qyESCV_g_JFx_Knm1MwB467wN3dEgy0M/edit#slide=id.g244d368397_0_1), [sales](https://docs.google.com/presentation/d/1KABQnt8WmtZe7u5l7WFUoPIsWzv63P9gsWF79XGLoZE/edit#slide=id.g244d368397_0_1) and [service](https://docs.google.com/presentation/d/1OIPFpkqkSYAPPFfq1-yICdfArg6mmG71P-cm15cpy7U/edit) ERDs.

This package enriches your Fivetran data by doing the following:

Expand Down Expand Up @@ -33,12 +33,12 @@ config-version: 2
vars:
hubspot_source:
hubspot_database: your_database_name
hubspot_schema: your_schema_name
hubspot_schema: your_schema_name
```

### Disabling models

When setting up your Hubspot connection in Fivetran, it is possible that not every table this package expects will be synced. This can occur because you either don't use that functionality in Hubspot or have actively decided to not sync some tables. In order to disable the relevant functionality in the package, you will need to add the relevant variables. By default, all variables are assumed to be `true`. You only need to add variables for the tables you would like to disable:
When setting up your Hubspot connection in Fivetran, it is possible that not every table this package expects will be synced. This can occur because you either don't use that functionality in Hubspot or have actively decided to not sync some tables. In order to disable the relevant functionality in the package, you will need to add the relevant variables. By default, all variables are assumed to be `true`. You only need to add variables for the tables you would like to disable:

```yml
# dbt_project.yml
Expand All @@ -51,7 +51,7 @@ vars:

# Marketing

hubspot_marketing_enabled: false # Disables all marketing models
hubspot_marketing_enabled: false # Disables all marketing models
hubspot_email_event_enabled: false # Disables all email_event models and functionality
hubspot_email_event_bounce_enabled: false
hubspot_email_event_click_enabled: false
Expand Down Expand Up @@ -80,13 +80,17 @@ vars:
hubspot_engagement_meetings_enabled: false
hubspot_engagement_notes_enabled: false
hubspot_engagement_tasks_enabled: false

# Service
hubspot_service_enabled: false # Disables all service models
hubspot_ticket_enabled: false # Disables all ticket models and functionality
```

## Contributions

Additional contributions to this package are very welcome! Please create issues
or open PRs against `master`. Check out
[this post](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657)
or open PRs against `master`. Check out
[this post](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657)
on the best workflow for contributing to a package.

## Resources:
Expand Down
75 changes: 40 additions & 35 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,43 @@ config-version: 2
require-dbt-version: [">=0.18.0", "<0.20.0"]

vars:
hubspot_source:
company: "{{ source('hubspot','company') }}"
company_property_history: "{{ source('hubspot','company_property_history') }}"
contact: "{{ source('hubspot','contact') }}"
contact_list: "{{ source('hubspot','contact_list') }}"
contact_list_member: "{{ source('hubspot','contact_list_member') }}"
contact_property_history: "{{ source('hubspot','contact_property_history') }}"
deal: "{{ source('hubspot','deal') }}"
deal_pipeline: "{{ source('hubspot','deal_pipeline') }}"
deal_pipeline_stage: "{{ source('hubspot','deal_pipeline_stage') }}"
deal_property_history: "{{ source('hubspot','deal_property_history') }}"
email_campaign: "{{ source('hubspot','email_campaign') }}"
email_event: "{{ source('hubspot','email_event') }}"
email_event_bounce: "{{ source('hubspot','email_event_bounce') }}"
email_event_click: "{{ source('hubspot','email_event_click') }}"
email_event_deferred: "{{ source('hubspot','email_event_deferred') }}"
email_event_delivered: "{{ source('hubspot','email_event_delivered') }}"
email_event_dropped: "{{ source('hubspot','email_event_dropped') }}"
email_event_forward: "{{ source('hubspot','email_event_forward') }}"
email_event_open: "{{ source('hubspot','email_event_open') }}"
email_event_print: "{{ source('hubspot','email_event_print') }}"
email_event_sent: "{{ source('hubspot','email_event_sent') }}"
email_event_spam_report: "{{ source('hubspot','email_event_spam_report') }}"
email_event_status_change: "{{ source('hubspot','email_event_status_change') }}"
engagement: "{{ source('hubspot','engagement') }}"
engagement_call: "{{ source('hubspot','engagement_call') }}"
engagement_company: "{{ source('hubspot','engagement_company') }}"
engagement_contact: "{{ source('hubspot','engagement_contact') }}"
engagement_deal: "{{ source('hubspot','engagement_deal') }}"
engagement_email: "{{ source('hubspot','engagement_email') }}"
engagement_meeting: "{{ source('hubspot','engagement_meeting') }}"
engagement_note: "{{ source('hubspot','engagement_note') }}"
engagement_task: "{{ source('hubspot','engagement_task') }}"
owner: "{{ source('hubspot','owner') }}"

hubspot_source:
company: "{{ source('hubspot','company') }}"
company_property_history: "{{ source('hubspot','company_property_history') }}"
contact: "{{ source('hubspot','contact') }}"
contact_list: "{{ source('hubspot','contact_list') }}"
contact_list_member: "{{ source('hubspot','contact_list_member') }}"
contact_property_history: "{{ source('hubspot','contact_property_history') }}"
deal: "{{ source('hubspot','deal') }}"
deal_pipeline: "{{ source('hubspot','deal_pipeline') }}"
deal_pipeline_stage: "{{ source('hubspot','deal_pipeline_stage') }}"
deal_property_history: "{{ source('hubspot','deal_property_history') }}"
email_campaign: "{{ source('hubspot','email_campaign') }}"
email_event: "{{ source('hubspot','email_event') }}"
email_event_bounce: "{{ source('hubspot','email_event_bounce') }}"
email_event_click: "{{ source('hubspot','email_event_click') }}"
email_event_deferred: "{{ source('hubspot','email_event_deferred') }}"
email_event_delivered: "{{ source('hubspot','email_event_delivered') }}"
email_event_dropped: "{{ source('hubspot','email_event_dropped') }}"
email_event_forward: "{{ source('hubspot','email_event_forward') }}"
email_event_open: "{{ source('hubspot','email_event_open') }}"
email_event_print: "{{ source('hubspot','email_event_print') }}"
email_event_sent: "{{ source('hubspot','email_event_sent') }}"
email_event_spam_report: "{{ source('hubspot','email_event_spam_report') }}"
email_event_status_change: "{{ source('hubspot','email_event_status_change') }}"
engagement: "{{ source('hubspot','engagement') }}"
engagement_call: "{{ source('hubspot','engagement_call') }}"
engagement_company: "{{ source('hubspot','engagement_company') }}"
engagement_contact: "{{ source('hubspot','engagement_contact') }}"
engagement_deal: "{{ source('hubspot','engagement_deal') }}"
engagement_email: "{{ source('hubspot','engagement_email') }}"
engagement_meeting: "{{ source('hubspot','engagement_meeting') }}"
engagement_note: "{{ source('hubspot','engagement_note') }}"
engagement_task: "{{ source('hubspot','engagement_task') }}"
owner: "{{ source('hubspot','owner') }}"
ticket_company: "{{ source('hubspot','ticket_company') }}"
ticket_contact: "{{ source('hubspot','ticket_contact') }}"
ticket_deal: "{{ source('hubspot','ticket_deal') }}"
ticket_engagement: "{{ source('hubspot','ticket_engagement') }}"
ticket_property_history: "{{ source('hubspot','ticket_property_history') }}"
ticket: "{{ source('hubspot','ticket') }}"
Loading