Skip to content

Release branch/v1.10.0 - #158

Merged
fivetran-savage merged 10 commits into
mainfrom
release_branch/v1.10.0
Aug 13, 2026
Merged

fivetran-savage merged 10 commits into
mainfrom
release_branch/v1.10.0

Conversation

@fivetran-savage

@fivetran-savage fivetran-savage commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

PR Overview

Package version introduced in this PR:

  • 1.10.0

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

Summary of changes:

  • Adds source_relation to the surrogate key for stripe__daily_overview
  • Adds account_id and source_relation to rolling fields partition in stripe__daily_overview, int_stripe__account_partitions, and int_stripe__account_rolling_totals.
  • Adds account_id to date spine join in int_stripe__daily and stripe__daily_overview.
  • Adds unit_amount_excluding_tax field to stg_stripe__invoice_line_item.
  • Sources historic pricing for stripe__subscription_item_mrr_report from stg_stripe__invoice_line_item.

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 marked this pull request as ready for review August 12, 2026 01:47
@fivetran-savage fivetran-savage self-assigned this Aug 12, 2026
@fivetran-savage fivetran-savage added the docs:ready Triggers the docs generator workflow. label Aug 12, 2026
then 0
else 1
end) over (order by date_day rows unbounded preceding) as {{ f }}_partition
end) over (partition by account_id, source_relation order by date_day rows unbounded preceding) as {{ f }}_partition

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.

For Redshift's sake we should use our source_relation handling macro here and in there other partion bys

Suggested change
end) over (partition by account_id, source_relation order by date_day rows unbounded preceding) as {{ f }}_partition
end) over (partition by account_id {{ fivetran_utils.partition_by_source_relation(package_name='stripe') }} order by date_day rows unbounded preceding) as {{ f }}_partition


{% for t in total_fields %}
, sum({{ t }}) over (order by date_day rows unbounded preceding) as rolling_{{ t }}
, sum({{ t }}) over (partition by account_id, source_relation order by date_day rows unbounded preceding) as rolling_{{ t }}

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.

Same here.

Comment thread models/stripe__daily_overview.sql Outdated
{% for f in rolling_fields %}
coalesce({{ f }},
first_value({{ f }}) over (partition by {{ f }}_partition order by date_day rows unbounded preceding)) as {{ f }}
first_value({{ f }}) over (partition by account_id, source_relation, {{ f }}_partition order by date_day rows unbounded preceding)) as {{ f }}

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.

Same here.

Comment on lines +270 to +273
partition by source_relation, subscription_item_id, invoiced_group
) as carried_quantity
) as carried_quantity,
max(invoiced_unit_amount) over (
partition by source_relation, subscription_item_id, invoiced_group

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.

Looks like there's some previous code we can correct too. 😄

case
when lower(normalized.recurring_interval) = 'week' then
{{ dbt_utils.safe_divide(
effective_amount ~ " * " ~ dbt_utils.safe_divide('52', '12'),

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.

I say we can remove safe divide here since 12 will never be 0, but I'll leave that up to you.

Suggested change
effective_amount ~ " * " ~ dbt_utils.safe_divide('52', '12'),
effective_amount ~ " * 52 / 12" ,

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.

Yeah, probably being overly cautious there.

Comment thread CHANGELOG.md
@fivetran-savage fivetran-savage removed the docs:ready Triggers the docs generator workflow. label Aug 12, 2026
@fivetran-savage fivetran-savage added the docs:ready Triggers the docs generator workflow. label Aug 12, 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 changelog suggestions!

Comment thread CHANGELOG.md Outdated

| Data Model(s) | Change type | Old | New | Notes |
| ------------- | ----------- | --- | --- | ----- |
| `stripe__daily_overview` (breaking change) | Changed field | surrogate key hashed on `account_id` and `date_day`. | surrogate key hashed on `source_relation`, `account_id`, and `date_day`. | Two unioned connectors that share an account ID and a date previously produced the same key. |

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.

I'd move the (breaking change) for each of the models into either the Change type or the Notes section. Data Model should just have the data models.

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.

Also might bold it, particularly the breaking change for all customers here.

Suggested change
| `stripe__daily_overview` (breaking change) | Changed field | surrogate key hashed on `account_id` and `date_day`. | surrogate key hashed on `source_relation`, `account_id`, and `date_day`. | Two unioned connectors that share an account ID and a date previously produced the same key. |
| `stripe__daily_overview` | Changed field (**breaking change**) | Surrogate key hashed on `account_id` and `date_day`. | Surrogate key hashed on `source_relation`, `account_id`, and `date_day`. | Two unioned connectors that share an account ID and a date previously produced the same key. |

Comment thread CHANGELOG.md Outdated
| ------------- | ----------- | --- | --- | ----- |
| `stripe__daily_overview` (breaking change) | Changed field | surrogate key hashed on `account_id` and `date_day`. | surrogate key hashed on `source_relation`, `account_id`, and `date_day`. | Two unioned connectors that share an account ID and a date previously produced the same key. |
| `stripe__daily_overview` (possible breaking change) | Possible changed data | Each `rolling_*` column accumulated across all accounts. | Each `rolling_*` column is the running total of its own `account_id` and `source_relation`. | Only affects destinations with more than one account or more than one unioned connector. Single-account output is unchanged. See [#155](https://github.com/fivetran/dbt_stripe/issues/155). |
| `int_stripe__account_daily`, `stripe__daily_overview` (possible breaking change) | Changed join | Balance transactions and failed charges join to the date spine on the date and `source_relation` only, so every account counts every other account's activity as its own. | Both joins also match on the account. | Only affects destinations with more than one account. Transactions with no `connected_account_id` still count toward every account; see the [DECISIONLOG](https://github.com/fivetran/dbt_stripe/blob/main/DECISIONLOG.md#daily-overview-attribution-for-transactions-without-a-connected-account) for why. Single-account output is unchanged. |

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.

I'd place the end model over the intermediate model.

Suggested change
| `int_stripe__account_daily`, `stripe__daily_overview` (possible breaking change) | Changed join | Balance transactions and failed charges join to the date spine on the date and `source_relation` only, so every account counts every other account's activity as its own. | Both joins also match on the account. | Only affects destinations with more than one account. Transactions with no `connected_account_id` still count toward every account; see the [DECISIONLOG](https://github.com/fivetran/dbt_stripe/blob/main/DECISIONLOG.md#daily-overview-attribution-for-transactions-without-a-connected-account) for why. Single-account output is unchanged. |
| `stripe__daily_overview`<br>`int_stripe__account_daily`| Changed join (**possible breaking change**) | Balance transactions and failed charges join to the date spine on the date and `source_relation` only, so every account counts every other account's activity as its own. | Both joins also match on the account. | Only affects destinations with more than one account. Transactions with no `connected_account_id` still count toward every account; see the [DECISIONLOG](https://github.com/fivetran/dbt_stripe/blob/main/DECISIONLOG.md#daily-overview-attribution-for-transactions-without-a-connected-account) for why. Single-account output is unchanged. |

Comment thread CHANGELOG.md Outdated
| Data Model(s) | Change type | Old | New | Notes |
| ------------- | ----------- | --- | --- | ----- |
| `stripe__daily_overview` (breaking change) | Changed field | surrogate key hashed on `account_id` and `date_day`. | surrogate key hashed on `source_relation`, `account_id`, and `date_day`. | Two unioned connectors that share an account ID and a date previously produced the same key. |
| `stripe__daily_overview` (possible breaking change) | Possible changed data | Each `rolling_*` column accumulated across all accounts. | Each `rolling_*` column is the running total of its own `account_id` and `source_relation`. | Only affects destinations with more than one account or more than one unioned connector. Single-account output is unchanged. See [#155](https://github.com/fivetran/dbt_stripe/issues/155). |

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 about moving (possible breaking change)

Comment thread CHANGELOG.md Outdated
| `stripe__daily_overview` (breaking change) | Changed field | surrogate key hashed on `account_id` and `date_day`. | surrogate key hashed on `source_relation`, `account_id`, and `date_day`. | Two unioned connectors that share an account ID and a date previously produced the same key. |
| `stripe__daily_overview` (possible breaking change) | Possible changed data | Each `rolling_*` column accumulated across all accounts. | Each `rolling_*` column is the running total of its own `account_id` and `source_relation`. | Only affects destinations with more than one account or more than one unioned connector. Single-account output is unchanged. See [#155](https://github.com/fivetran/dbt_stripe/issues/155). |
| `int_stripe__account_daily`, `stripe__daily_overview` (possible breaking change) | Changed join | Balance transactions and failed charges join to the date spine on the date and `source_relation` only, so every account counts every other account's activity as its own. | Both joins also match on the account. | Only affects destinations with more than one account. Transactions with no `connected_account_id` still count toward every account; see the [DECISIONLOG](https://github.com/fivetran/dbt_stripe/blob/main/DECISIONLOG.md#daily-overview-attribution-for-transactions-without-a-connected-account) for why. Single-account output is unchanged. |
| `stripe__subscription_item_mrr_report` (possible breaking change) | Changed model | Historical months apply the item's current `price_plan` unit amount. | Historical months apply the `unit_amount_excluding_tax` from the invoice line that billed them, carried forward across gap months. | MRR now reflects a price change from the month it took effect instead of applying today's price across all history, so historical `month_contract_mrr`, `month_discount_applied`, `month_billed_mrr`, and `contract_mrr_type` values change. Months with no invoiced unit amount still use the live `price_plan` unit amount. See the [DECISIONLOG](https://github.com/fivetran/dbt_stripe/blob/main/DECISIONLOG.md#mrr-history-anchored-to-each-subscription-items-creation-date). |

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 about moving (possible breaking change)

@fivetran-savage
fivetran-savage merged commit 3b8df88 into main Aug 13, 2026
9 checks passed
@fivetran-savage
fivetran-savage deleted the release_branch/v1.10.0 branch August 13, 2026 16:17
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.

5 participants