Skip to content

feature/add-journey-models - #84

Merged
fivetran-savage merged 12 commits into
mainfrom
feature/add-journey-models
Sep 15, 2026
Merged

fivetran-savage merged 12 commits into
mainfrom
feature/add-journey-models

Conversation

@fivetran-savage

Copy link
Copy Markdown
Contributor

PR Overview

Package version introduced in this PR:

  • 1.6.0

This PR addresses the following Issue/Feature(s):

Summary of changes:

  • Adds iterable__journeys end model, a journey-grain rollup of engagement metrics, unique users, and derived rates.
  • Adds journey_id, journey_name, and journey_type to iterable__campaigns.
  • Adds stg_iterable__journey source table.

Submission Checklist

  • Alignment meeting with the reviewer (if needed)
    • Timeline and validation requirements discussed
  • Provide validation details:
    • Validation Steps: Check for unintentional effects (e.g., add/run consistency & integrity tests)
    • Testing Instructions: Confirm the change addresses the issue(s)
    • Focus Areas: Complex logic or queries that need extra attention
  • Merge any relevant open PRs into this PR

Changelog

  • Draft changelog for PR
  • Final changelog for release review

@fivetran-savage fivetran-savage added the docs:ready Triggers the docs generator workflow. label Sep 10, 2026
@fivetran-savage fivetran-savage self-assigned this Sep 10, 2026

@fivetran-avinash fivetran-avinash left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-savage Looking good! A few suggestions and comments to take a look at.

Comment thread README.md Outdated
@@ -0,0 +1,5 @@
id,name,journey_type,description,creator_user_id,enabled,is_archived,lifetime_limit,simultaneous_limit,start_tile_id,trigger_event_names,created_at,updated_at,_fivetran_synced,draft_name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

journey_type in the seed data is indicated as Published/Draft in the API docs, should we use those values? I notice those in a few sample schemas as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We pull campaign_state into the end model, which includes both draft and aborted campaigns.

Comment thread models/staging/src_iterable.yml Outdated
Comment thread models/staging/stg_iterable__journey.sql
Comment thread models/staging/stg_iterable.yml Outdated
- name: journey_name
description: User defined name of the journey
- name: journey_type
description: The journey type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment as src_iterable.yml

Comment thread models/iterable__journeys.sql Outdated
-- numerator and denominator events are present in the `iterable__event_metrics` variable,
-- since that list is user-configurable and may not include every email event.
{%- set rate_expressions = [] %}
{%- if 'emailsend' in event_metrics %}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The email_open_rate/click_rate/bounce_rate/unsubscribe_rate calculations divide total_emailopen/total_emailclick/etc by total_emailsend. But since users can re-enter the same journey multiple times (based on the lifetime_limit definition), campaigns can recur, and a single email could potentially be opened/clicked more than once, these rates could end up over 100%.

Should we consider using the unique_total_* columns (already computed alongside the raw totals in int_iterable__journey_event_metrics) for both the numerator and denominator instead, so the rate reflects distinct users and stays properly bounded?

(We could consider other metrics for the raw event counts if we want to utilize them too).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point and worth considering. Makes journeys a bit different from campaigns in the way metrics can/should be calculated, potentially.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should be calculating rates at all? Looks like iterable__campaigns doesn't calculate these metrics, so maybe we should leave the raw event counts for users to calculate metrics in their own BI tools.

Comment thread models/iterable__campaigns.sql
Comment thread CHANGELOG.md
Comment thread README.md
Comment thread CHANGELOG.md Outdated
@fivetran-data-model-bot fivetran-data-model-bot removed the docs:ready Triggers the docs generator workflow. label Sep 14, 2026
@fivetran-savage fivetran-savage added the docs:ready Triggers the docs generator workflow. label Sep 14, 2026
@fivetran-data-model-bot fivetran-data-model-bot removed the docs:ready Triggers the docs generator workflow. label Sep 14, 2026
@fivetran-savage fivetran-savage added the docs:ready Triggers the docs generator workflow. label Sep 14, 2026

@fivetran-avinash fivetran-avinash left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-savage Approved with some final minor comments!

Comment thread integration_tests/seeds/journey_data.csv Outdated
Comment thread CHANGELOG.md Outdated
Comment thread README.md Outdated
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
@fivetran-savage fivetran-savage added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Sep 15, 2026
@fivetran-savage
fivetran-savage merged commit 1cc764a into main Sep 15, 2026
12 checks passed
@fivetran-savage
fivetran-savage deleted the feature/add-journey-models branch September 15, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs:ready Triggers the docs generator workflow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants