Microsoft Dynamics 365 CRM dbt Package
This dbt package transforms data from Fivetran's Microsoft Dynamics 365 CRM connector into analytics-ready tables.
Resources
- Number of materialized models¹:
- Quickstart users: varies (one model per source table in your Dynamics 365 CRM connection)
- dbt Core users: 12
- Connector documentation
- dbt package documentation
- dbt Core™ supported versions
>=1.3.0, <3.0.0
What does this dbt package do?
This package enables you to enhance Microsoft Dynamics 365 CRM data by adding human-readable labels for coded values and integrate stringmaps into source tables. It creates enriched models with metrics focused on translating codes into meaningful labels for better data analysis.
Output schema
Final output tables are generated in the following target schema:
<your_database>.<connector/schema_name>_dynamics_365_crm
Final output tables
For Quickstart Users
When using Fivetran Quickstart, this package utilizes dynamic model generation based on your specific Dynamics 365 CRM configuration. For each source table in your Dynamics 365 CRM instance, a corresponding enriched model will be created with stringmap labels applied.
Dynamic Model Structure:
| Output Model | Description |
|---|---|
<your_source_table_name> | Each source table from your Dynamics 365 CRM instance, enriched with human-readable labels for coded fields. Stringmap labels are added as <field_name>_label columns alongside the original coded values. |
Example: If your Dynamics 365 CRM instance has tables like account, contact, custom_entity_abc, and opportunity, you'll get corresponding enriched models: account, contact, custom_entity_abc, and opportunity, each with stringmap labels applied where available.
Note: Quickstart users may or may not have the standard tables listed below, as their models are generated dynamically based on their specific Dynamics 365 CRM setup and enabled entities.
For dbt Core Users
By default, this package materializes the following final tables for dbt Core users:
| Table | Description |
|---|---|
account | Model representing accounts in Dynamics 365 CRM, enriched with human-readable column names for fields with corresponding stringmap labels created as <field_name>_label. |
appointment | Model representing appointments in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
contact | Model for contacts in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
email | Model for emails in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
incident | Model for incidents in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
msdyn_customerasset | Model for customer assets in Dynamics 365 Field Service, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
msdyn_workorder | Model for work orders in Dynamics 365 Field Service, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
msdyn_workorderproduct | Model for work order products in Dynamics 365 Field Service, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
opportunity | Model for opportunities in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
phonecall | Model for phone calls in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
systemuser | Model for system users in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
task | Model for tasks in Dynamics 365 CRM, enriched with human-readable column names for fields with stringmap labels created as <field_name>_label. |
Note: To extend beyond these standard models and create custom stringmapped models for your organization's specific entities, see the Additional configurations section below.
¹ Each dbt Core 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. For Quickstart users, the number of models will vary based on dynamic model generation.
Prerequisites
To use this dbt package, you must have the following:
- At least one Fivetran Dynamics 365 CRM connection syncing data into your destination.
- A BigQuery, Snowflake, Redshift, Databricks, or PostgreSQL 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.