Skip to content

Zuora model updates#34

Open
dwallacerjm wants to merge 9 commits intoanalyst-collective:masterfrom
dwallacerjm:zuora-model-updates
Open

Zuora model updates#34
dwallacerjm wants to merge 9 commits intoanalyst-collective:masterfrom
dwallacerjm:zuora-model-updates

Conversation

@dwallacerjm
Copy link

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.

@jthandy jthandy self-assigned this Apr 13, 2016
@jthandy
Copy link
Member

jthandy commented Apr 13, 2016

@dwallacerjm should get to this on friday.

@jthandy jthandy assigned 3mei and unassigned jthandy Apr 18, 2016
@jthandy
Copy link
Member

jthandy commented Apr 18, 2016

@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 (
Copy link
Collaborator

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.

Copy link
Author

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.

@jthandy
Copy link
Member

jthandy commented Apr 21, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants