fivetran / dbt_stripe

Data models for Stripe built using dbt.
https://fivetran.github.io/dbt_stripe/
Apache License 2.0
29 stars 33 forks source link

BUG - `most_recent_sale_date` using wrong aggregation #27

Closed fivetran-joemarkiewicz closed 2 years ago

fivetran-joemarkiewicz commented 2 years ago

Are you a current Fivetran customer?

Fivetran created Bug

Describe the bug

The calculation for most_recent_sale_date is currently using a min aggregation. However, it should instead be max. https://github.com/fivetran/dbt_stripe/blob/1815eb873fc7a6be03da158db5e4ee990f994e61/models/stripe__customer_overview.sql#L71-L74

Expected behavior

The most_recent_sale_date should be the max date.

fivetran-joemarkiewicz commented 2 years ago

The merged PR above resolved this issue and the fix is live in the latest version of the package.