-
Notifications
You must be signed in to change notification settings - Fork 11
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
Zuora model updates #34
base: master
Are you sure you want to change the base?
Zuora model updates #34
Conversation
…_subscription model
@dwallacerjm should get to this on friday. |
@dwallacerjm FYI spoke to @3mei about this and agreed that since he did the initial version he's in a better position to review. I believe the goal is to look at it tomorrow. |
@@ -1,12 +1,158 @@ | |||
with sub_mrr as ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwallacerjm Dave, this analysis should be in the analytics/analysis/zuora
folder, not analytics/models/zuora
. The general idea is to first create base models which map the underlying zuora tables into views that incorporate only what's needed for subsequent transformations and analysis, including all of the casting and any transformation that may be duplicated down the line. In other words: create an abstraction that makes it easier to write and read SQL down the line.
This is exactly what's happening int the original zuora_subscription.sql
, which is a base model for the underlying zuora.zuora_subscription
table. There is casting into timestamps and the subscription version is calculated in that view so that we don't have to worry about it down the line.
Also, let's keep subscr
instead of sub
as this is more descriptive to someone going through this analysis in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little bit confused here @3mei . This SQL is for the creation of the model. It isn't an analysis at all.
And this is code review. Love that we're doing this. Thanks to both of you for working through this. @dwallacerjm model and analysis design--specifically, designing for modularity and usability--is something that we've thought a ton about. Would absolutely love to get your head on that problem too, but those design priorities are baked into the AC viewpoint. @3mei 's comments here are spot on in terms of pushing this PR towards conforming with that viewpoint. |
Updates to make the
zuora_subscription
model more robust. Put in a lot of aggregation functionality for things like a subscription's total MRR, TCV, list of distinct products, list of distinct billing frequencies, etc.Also added an analysis file
new_business_metrics.sql
that calculates various new business metrics.