-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Demo) Fix: customer lifetime value calculation in customers #1
base: main
Are you sure you want to change the base?
Conversation
Should we also check customer_order_pattern? |
Since the sources have been updated in the production environment, I've rebased the PR, rerun the checks, and updated the body. Most of the checks yield the same results, but I noticed that 99% of the value segments are classified as 'high value' (refer to the Top-k diff above). I plan to review the threshold next week. |
eedae39
to
94036fd
Compare
94036fd
to
183171a
Compare
183171a
to
f35cbd1
Compare
f35cbd1
to
231f592
Compare
This comment was marked as outdated.
This comment was marked as outdated.
231f592
to
4080960
Compare
This comment was marked as outdated.
This comment was marked as outdated.
4080960
to
01a9ef1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
01a9ef1
to
2ff3a39
Compare
Recce SummaryManifest Information
Lineage Graphgraph LR
model.jaffle_shop.customers["customers
[What's Changed]
Code, Value Diff"]
style model.jaffle_shop.customers stroke:#ffa502
model.jaffle_shop.customers---->model.jaffle_shop.customer_segments
model.jaffle_shop.customers---->model.jaffle_shop.customer_order_pattern
model.jaffle_shop.customer_segments["customer_segments"]
model.jaffle_shop.customer_order_pattern["customer_order_pattern"]
Checks Summary
Checks of Data Mismatch Detected
See PR page: https://cloud.datarecce.io/DataRecce/jaffle_shop_duckdb/pulls/1 How to check the recce result# Launch the recce server based on the state file
recce server --review --cloud --password yummy_jaffle
# Open the recce server http://localhost:8000 by your browser |
0c99b5a
to
7ca327e
Compare
e9fbba7
to
383a007
Compare
383a007
to
398ac78
Compare
398ac78
to
75a349b
Compare
75a349b
to
d5fe9c4
Compare
d5fe9c4
to
73dce86
Compare
73dce86
to
4526216
Compare
4526216
to
b8709ec
Compare
083a55b
to
8337818
Compare
2c00e38
to
58feedb
Compare
58feedb
to
5ec10dd
Compare
Description & motivation
The customer lifetime value (CLV) in
customers
model incorrectly included orders that were not yet completed, leading to potentially inaccurate business insights.I modified the CLV calculation within
customers
to consider only "completed" orders.To-do before merge
Notify Stakeholders
Lineage:
Lineage DAG Diff
Modified
customers
model to adjustcustomer_lifetime_value
calculation.Validation of models:
As expected, the customer lifetime value has changed. The average value of CLV has been reduced and this affects 98% of customers.
Query Diff:
customers
The
customer_lifetime_value
has reduced for certain customers. This is expected given the change to the CLV calculation.Profile Diff:
customers
Min/max remains unchanged, average value has dropped from 2758.6 to 1871.76 as expected.
Value Diff:
customers
Only 1.19% match on
customer_lifetime_value
.Magic metric of
customers
Our magic metric, average lifetime value, goes down as well.
SQL
Impact considerations:
The adjustment to CLV values has resulted in 26.45% change of customer ‘value segment’. This impact is also expected.
Value Diff:
customer_segments
customer_lifetime_value
as expected matches parent table at 1.19%.value_segment
is changed by 26.45%.Query Diff:
customer_segments
value_segment
has changed for some of those customers with a decreased CLV. This is expected and I'll notify the business team.Top-k diff:
value_segment
We've seen a 17% drop in high-value customers. We need to discuss with stakeholders whether an adjustment to the threshold is necessary.
There is no change in customer_order_pattern.
Value diff:
customer_order_pattern
There is no change.
Changes to existing models:
N/A
Checklist:
This checklist is mostly useful as a reminder of small things that can easily be
forgotten – it is meant as a helpful tool rather than hoops to jump through.
Put an
x
in all the items that apply, make notes next to any that haven't beenaddressed, and remove any items that are not relevant to this PR.