Hubspot dbt Package
This dbt package transforms data from Fivetran's Hubspot connector into analytics-ready tables.
Resources
- Number of materialized models¹: 147
- Connector documentation
- dbt package documentation
What does this dbt package do?
This package enables you to better understand your HubSpot email and engagement performance and generates comprehensive data dictionaries. It creates enriched models with metrics focused on contacts, companies, deals, and analysis-ready event tables for email and engagement activities.
Output schema
Final output tables are generated in the following target schema:
<your_database>.<connector/schema_name>_hubspot
Final output tables
By default, this package materializes the following final tables:
| Table | Description |
|---|---|
| hubspot__companies | Each record represents a company in Hubspot, enriched with metrics about engagement activities. Example Analytics Questions:
|
| hubspot__company_history | Each record represents a change to a company in Hubspot, with valid_to and valid_from information.Example Analytics Questions:
|
| hubspot__contacts | Each record represents a contact in Hubspot, enriched with metrics about email and engagement activities. Example Analytics Questions:
|
| hubspot__contact_history | Each record represents a change to a contact in Hubspot, with valid_to and valid_from information.Example Analytics Questions:
|
| hubspot__contact_lists | Each record represents a contact list in Hubspot, enriched with metrics about email activities. Example Analytics Questions:
|
| hubspot__deals | Each record represents a deal in Hubspot, enriched with metrics about engagement activities. Example Analytics Questions:
|
| hubspot__deal_stages | Each record represents when a deal stage changes in Hubspot, with stage entry/exit dates and pipeline metadata. Example Analytics Questions:
|
| hubspot__deal_history | Each record represents a change to a deal in Hubspot, with valid_to and valid_from information.Example Analytics Questions:
|
| hubspot__tickets | Each record represents a ticket in Hubspot, enriched with metrics about engagement activities and information on associated deals, contacts, companies, and owners. Example Analytics Questions:
|
| hubspot__daily_ticket_history | Each record represents a ticket's day in Hubspot with tracked properties pivoted out into columns. Example Analytics Questions:
|
| hubspot__email_campaigns | Each record represents a email campaign in Hubspot, enriched with metrics about email activities. Example Analytics Questions:
|
| hubspot__email_event_* | Each record represents an email event in Hubspot, joined with relevant tables to make them analysis-ready. Example Analytics Questions:
|
| hubspot__email_sends | Each record represents a sent email in Hubspot, enriched with metrics about opens, clicks, and other email activity. Example Analytics Questions:
|
| hubspot__engagements | Each record represents an engagement in Hubspot, enriched with contact, company, and deal information. Example Analytics Questions:
|
| hubspot__engagement_* | Each record represents an engagement event in Hubspot, joined with relevant tables to make them analysis-ready. Example Analytics Questions:
|
¹ Each Quickstart transformation job run materializes these models if all components of this data model are enabled. This count includes all staging, intermediate, and final models materialized as view, table, or incremental.
Prerequisites
To use this dbt package, you must have the following:
- At least one Fivetran HubSpot connection syncing data into your destination.
- A BigQuery, Snowflake, Redshift, PostgreSQL, or Databricks destination.
How do I use the dbt package?
You can either add this dbt package in the Fivetran dashboard or import it into your dbt project:
- To add the package in the Fivetran dashboard, follow our Quickstart guide.
- To add the package to your dbt project, follow the setup instructions in the dbt package's README file to use this package.
How is this package maintained and can I contribute?
Package Maintenance
The Fivetran team maintaining this package only maintains the latest version of the package. We highly recommend you stay consistent with the latest version of the package and refer to the CHANGELOG and release notes for more information on changes across versions.
Contributions
A small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions.
We highly encourage and welcome contributions to this package. Learn how to contribute to a package in dbt's Contributing to an external dbt package article.