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.
@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.
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_subscriptionmodel 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.sqlthat calculates various new business metrics.