Salesforce dbt Package
This dbt package transforms data from Fivetran's Salesforce connector into analytics-ready tables.
Resources
- Number of materialized models¹: 23
- Connector documentation
- dbt package documentation
What does this dbt package do?
This package enables you to understand opportunity performance, analyze sales team performance, and track daily sales activities. It creates enriched models with metrics focused on pipeline management, bookings analysis, and historical tracking.
Note: This package also provides you with the option to leverage the history mode to gather historical records of your essential tables.
Output schema
Final output tables are generated in the following target schema:
<your_database>.<connector/schema_name>_salesforce
Final output tables
By default, this package materializes the following final tables:
| Table | Description |
|---|---|
| salesforce__manager_performance | This table provides performance metrics by manager, showing team level pipeline, bookings, losses, and win rates. Example Analytics Questions:
|
| salesforce__owner_performance | This table provides an enhanced view of individual sales team members, including metrics around bookings, pipeline, losses, and win percentage. Example Analytics Questions:
|
| salesforce__sales_snapshot | This table provides a single-row snapshot of current and all-time sales funnel metrics. Example Analytics Questions:
|
| salesforce__opportunity_enhanced | This table enriches opportunities with data about the associated account and opportunity owner. Example Analytics Questions:
|
| salesforce__contact_enhanced | This table enriches contacts with information about the associated account and contact owner. Example Analytics Questions:
|
| salesforce__daily_activity | This table provides a daily summary of sales activities related to the creation and conversion of leads, tasks, and opportunities. Example Analytics Questions:
|
| salesforce__opportunity_line_item_enhanced | This table showcases individual line items belonging to opportunities and adds associated product details. Example Analytics Questions:
|
| salesforce__account_daily_history | Not currently avaialble in Quickstart: This table provides a daily record of each account, starting with its first active date and extending to its last active date, or the current date if the account is still active. Example Analytics Questions:
|
| salesforce__contact_daily_history | Not currently avaialble in Quickstart: This table provides a daily record of each contact, starting with its first active date and extending to its last active date, or the current date if the contact is still active. Example Analytics Questions:
|
| salesforce__opportunity_daily_history | Not currently avaialble in Quickstart: This table provides a daily record of each opportunity, starting with its first active date and extending to its last active date, or the current date if the opportunity is still active. Example Analytics Questions:
|
Note: For Quickstart Data Model users only, in addition to the above output models that are Quickstart compatible, you will also receive models in your transformation list which replicate all of your Salesforce objects with the inclusion of the relevant formula fields in the generated output models.
¹ 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 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.