Skip to content

Commit 9fe40f0

Browse files
2 parents ea121f1 + 0469a1e commit 9fe40f0

4 files changed

Lines changed: 21 additions & 4 deletions

File tree

.quickstart/quickstart.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
database_key: salesforce_marketing_cloud_database
2+
schema_key: salesforce_marketing_cloud_schema
3+
4+
dbt_versions: ">=1.3.0 <2.0.0"
5+
6+
table_variables:
7+
salesforce_marketing_cloud__link_enabled:
8+
- link_send
9+
- link
10+
salesforce_marketing_cloud__list_enabled:
11+
- list_subscriber
12+
- list
13+
14+
destination_configurations:
15+
databricks:
16+
dispatch:
17+
- macro_namespace: dbt_utils
18+
search_order: [ 'spark_utils', 'dbt_utils' ]

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
This package models Salesforce Marketing Cloud data from [Fivetran's connector](https://fivetran.com/docs/applications/salesforce_marketing_cloud). It uses data in the format described by [this ERD](https://fivetran.com/docs/applications/salesforce_marketing_cloud#schemainformation).
77

88
The main focus of the package is to transform the core object tables into analytics-ready models:
9-
<!--section="salesforce_marketing_cloud_model"-->
10-
- Materializes [Salesforce Marketing Cloud staging tables](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/overview/salesforce_marketing_cloud_source/models/?g_v=1) which leverage data in the format described by [this ERD](https://fivetran.com/docs/applications/salesforce_marketing_cloud/#schemainformation). The staging tables clean, test, and prepare your Salesforce Marketing Cloud data from [Fivetran's connector](https://fivetran.com/docs/applications/salesforce_marketing_cloud_source) for analysis by doing the following:
9+
- Materializes [Salesforce Marketing Cloud staging tables](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/overview/salesforce_marketing_cloud/models/?g_v=1) which leverage data in the format described by [this ERD](https://fivetran.com/docs/applications/salesforce_marketing_cloud/#schemainformation). The staging tables clean, test, and prepare your Salesforce Marketing Cloud data from [Fivetran's connector](https://fivetran.com/docs/applications/salesforce_marketing_cloud) for analysis by doing the following:
1110
- Primary keys are renamed from `id` to `<table name>_id`.
1211
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
1312
- Provides insight into your Salesforce Marketing Cloud data across the following grains:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following table provides a detailed list of all models materialized within t
3333
| **model** | **description**|
3434
| --------- | -------------- |
3535
| [salesforce_marketing_cloud__email_overview](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/model/model.salesforce_marketing_cloud.salesforce_marketing_cloud__email_overview) | Each record provides the performance of an email via `total_*` and `*_rate` metrics. |
36-
| [salesforce_marketing_cloud__events_enhanced](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/model/model.salesforce_marketing_cloud.salesforce_marketing_cloud__event_enhanced) | Each record expands the source events information by pivoting the `event_type` options into boolean fields. Each record also has related send and email information added. |
36+
| [salesforce_marketing_cloud__events_enhanced](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/model/model.salesforce_marketing_cloud.salesforce_marketing_cloud__events_enhanced) | Each record expands the source events information by pivoting the `event_type` options into boolean fields. Each record also has related send and email information added. |
3737
| [salesforce_marketing_cloud__sends_links](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/model/model.salesforce_marketing_cloud.salesforce_marketing_cloud__sends_links) | Each record provides a link, joined with all corresponding send(s). |
3838
| [salesforce_marketing_cloud__sends_overview](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/model/model.salesforce_marketing_cloud.salesforce_marketing_cloud__sends_overview) | Each record provides the performance of a send via `total_*` and `*_rate` metrics. |
3939
| [salesforce_marketing_cloud__subscriber_lists](https://fivetran.github.io/dbt_salesforce_marketing_cloud/#!/model/model.salesforce_marketing_cloud.salesforce_marketing_cloud__subscriber_lists) | Each record provides a list, joined with all corresponding subscriber(s). |

models/salesforce_marketing_cloud__subscriber_overview.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ with subscribers as (
2121
case when subscribers.unsubscribed_date is not null
2222
then {{ dbt.datediff("subscribers.created_date", "subscribers.unsubscribed_date", "day") }}
2323
else {{ dbt.datediff("subscribers.created_date", "current_date", "day") }}
24-
end as days_subscribed,
24+
end as days_subscribed,
2525
sum(case when events_enhanced.is_sent then 1 else 0 end) as number_of_sends,
2626
max(case when events_enhanced.is_sent then events_enhanced.event_date end) as most_recent_send,
2727
sum(case when events_enhanced.is_open then 1 else 0 end) as number_of_opens,

0 commit comments

Comments
 (0)