This package models Mailchimp data from Fivetran's connector. It uses data in the format described by this ERD.
The main focus of the package is to transform the 'recipient' and 'activity' tables into analytics-ready models and use that data to provide aggregate metrics about campaigns, automations, lists, members, and segments!
The primary outputs of this package are described below. Intermediate models are used to create these output models.
model | description |
---|---|
mailchimp_automation_emails | Each record represents an automation email (that make up automations), enriched with click, open, and unsubscribe metrics. This output is enabled if you are using automations. |
mailchimp_automations | Each record represents an automation in Mailchimp, enriched with click, open, and unsubscribe metrics. This output is enabled if you are using automations. |
mailchimp_campaign_activities | Each record represents an activity taken in relation to a campaign email, enriched with data about when the campaign was sent and the lag between send and the activity. |
mailchimp_campaign_recipients | Each record represents the send of a campaign email, enriched with click, open, and unsubscribe metrics. |
mailchimp_campaigns | Each record represents a campaign in Mailchimp, enriched with click, open, and unsubscribe metrics. |
mailchimp_lists | Each record represents a list in Mailchimp, enriched with campaign metrics, (optional) automation metrics, and (optional) information about members. |
mailchimp_members | Each record represents a member in Mailchimp, enriched with campaign metrics and (optional) automation metrics. |
mailchimp_segments | Each record represents a segment in Mailchimp, enriched with campaign metrics and (optional) automation metrics. This output is enabled if you are using segments. |
Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.
By default, this package looks for your Mailchimp data in the mailchimp
schema of your target database. If this is not where your Mailchimp data is, add the following configuration to your dbt_project.yml
file:
# dbt_project.yml
...
config-version: 2
vars:
mailchimp_schema: your_database_name
mailchimp_database: your_schema_name
It's possible that your Mailchimp connector does not sync every table that this package expects. If your syncs exclude certain tables, it is because you either don't use that functionality in Mailchimp or actively excluded some tables from your syncs. To disable the corresponding functionality in the package, you must add the relevant variables. By default, all variables are assumed to be true
. Add variables for only the tables you would like to disable:
# dbt_project.yml
...
config-version: 2
vars:
mailchimp:
using_automations: false #disable if you do not have the automation_email, automation_email, or automation_recipient_activity tables
using_segments: false #disable if you do not have the segment table
Additional contributions to this package are very welcome! Please create issues
or open PRs against master
. Check out
this post
on the best workflow for contributing to a package.
- Provide feedback on our existing dbt packages or what you'd like to see next
- Find all of Fivetran's pre-built dbt packages in our dbt hub
- Learn more about Fivetran in the Fivetran docs
- Check out Fivetran's blog
- Learn more about dbt in the dbt docs
- Check out Discourse for commonly asked questions and answers
- Join the chat on Slack for live discussions and support
- Find dbt events near you
- Check out the dbt blog for the latest news on dbt's development and best practices