This package models Iterable data from Fivetran’s connector. It uses data in the format described by this ERD.
This package enriches your Fivetran data by doing the following:
- Adds descriptions to tables and columns that are synced using Fivetran.
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
- Models staging tables, to be used in our transform package.
Modelslink
This package contains staging models, designed to work simultaneously with our Iterable transformation package. The staging models name columns consistently across all packages:
- Boolean fields are prefixed with
is_
orhas_
. - Timestamps are appended with
_at
. - ID primary keys are prefixed with the name of the table. For example, the campaign history table’s ID column is renamed
campaign_history_id
.
Installation Instructionslink
dbt_iterable_source
currently supports dbt 0.20.x
.
Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.
Include in your packages.yml
packages:
- package: fivetran/iterable_source
version: [">=0.4.0", "<0.5.0"]
Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.
Configurationlink
By default, this package looks for your Iterable data in the iterable
schema of your target database. If this is not where your Iterable data is, add the following configuration to your dbt_project.yml
file:
...
config-version: 2
vars:
iterable_schema: your_schema_name
iterable_database: your_database_name
Enabling and Disabling Modelslink
Your Iterable connector might 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 Iterable or have actively excluded some tables from your syncs. In order to enable or disable the relevant functionality in the package, you will need to add the relevant variables.
By default, all variables are assumed to be true
(with exception of iterable__using_user_device_history
, which is set to false
). You only need to add variables for the tables you would like to enable or disable respectively:
config-version: 2
vars:
iterable__using_campaign_label_history: false # default is true
iterable__using_user_unsubscribed_message_type_history: false # default is true
iterable__using_user_device_history: true # default is FALSE
Deprecated CAMPAIGN_SUPRESSION_LIST_HISTORY
tablelink
The Iterable connector schema originally misspelled the CAMPAIGN_SUPPRESSION_LIST_HISTORY
table as CAMPAIGN_SUPRESSION_LIST_HISTORY
(note the singular P
). As of August 2021, Fivetran has deprecated the misspelled table and will only continue syncing the correctly named CAMPAIGN_SUPPRESSION_LIST_HISTORY
table.
By default, this package refers to the new table (CAMPAIGN_SUPPRESSION_LIST_HISTORY
). To change this so that the package works with the old misspelled source table (we do not recommend this, however), add the following configuration to your dbt_project.yml
file:
config-version: 2
vars:
iterable_source:
iterable__campaign_suppression_list_history_table: "campaign_supression_list_history"
Changing the Build Schemalink
By default, this package will build the Iterable staging models within a schema titled (<target_schema> + _stg_iterable
) in your target database. If this is not where your would like you Iterable staging data to be written to, add the following configuration to your dbt_project.yml
file:
...
models:
iterable_source:
+schema: my_new_schema_name # leave blank for just the target_schema
Contributionslink
Additional contributions to this package are very welcome! Please create issues
or open PRs against main
. See the
Discourse post
on the best workflow for contributing to a package.
Database Supportlink
This package has been tested on BigQuery, Snowflake, Redshift, and Postgres.
Resources:link
- Provide feedback on our existing dbt packages or what you’d like to see next
- Have questions or feedback, or need help? Book a time during our office hours here or shoot us an email at solutions@fivetran.com.
- Find all of Fivetran’s pre-built dbt packages in our dbt hub
- Learn how to orchestrate your models with Fivetran Transformations for dbt Core™
- Learn more about Fivetran overall in our 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