Salesforce Marketing Cloud dbt Package
This dbt package transforms data from Fivetran's Salesforce Marketing Cloud connector into analytics-ready tables.
Resources
- Number of materialized models¹: 24
- Connector documentation
- dbt package documentation
What does this dbt package do?
This package enables you to transform core object tables into analytics-ready models and generate comprehensive data dictionaries. It creates enriched models with metrics focused on email, send, event, link, list, and subscriber data.
Output schema
Final output tables are generated in the following target schema:
<your_database>.<connector/schema_name>_sfmc
Final output tables
By default, this package materializes the following final tables:
| Table | Description |
|---|---|
| salesforce_marketing_cloud__email_overview | Summarizes email performance with aggregate metrics including total sends, opens, clicks, bounces, and engagement rates to evaluate email effectiveness at the email level. Example Analytics Questions:
|
| salesforce_marketing_cloud__events_enhanced | Tracks individual email events with event types pivoted into boolean fields and enriched with send and email details to analyze granular user interactions and event patterns. Example Analytics Questions:
|
| salesforce_marketing_cloud__sends_links | Connects email links to their corresponding sends to analyze link click activity, measure call-to-action effectiveness, and understand which URLs drive the most engagement. Example Analytics Questions:
|
| salesforce_marketing_cloud__sends_overview | Provides send-level performance metrics including total opens, clicks, bounces, and engagement rates to measure the effectiveness of individual email sends and identify optimization opportunities. Example Analytics Questions:
|
| salesforce_marketing_cloud__subscriber_lists | Connects subscriber lists to individual subscribers to manage list memberships, analyze list growth, and understand subscriber distribution across segmentation lists. Example Analytics Questions:
|
| salesforce_marketing_cloud__subscriber_overview | Consolidates subscriber-level engagement metrics including total sends received, open rates, click rates, and bounce history to understand individual subscriber behavior and preferences. 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 Salesforce Marketing Cloud connection syncing data into your destination.
- A BigQuery, Snowflake, Redshift, Databricks, or PostgreSQL destination.
Database Incremental Strategies
The salesforce_marketing_cloud__events_enhanced model in this package is materialized incrementally and is configured to work with the different strategies available to each supported warehouse.
For BigQuery and Databricks All-Purpose Cluster runtime destinations, we have chosen insert_overwrite as the default strategy, which benefits from the partitioning capability.
For all other Databricks runtimes, models are materialized as tables without support for incremental runs.
For Snowflake, Redshift, and Postgres databases, we have chosen delete+insert as the default strategy.
Regardless of strategy, we recommend that users periodically run a
--full-refreshto ensure a high level of data quality.
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.