Skip to content

Commit 6a7c1cc

Browse files
Merge pull request #26 from fivetran/feature/standardized-billing-line-item-model
Feature/standardized billing line item model
2 parents 8f4a421 + 35680eb commit 6a7c1cc

16 files changed

Lines changed: 415 additions & 60 deletions

.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,27 @@
44
**This PR will result in the following new package version:**
55
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->
66

7-
**Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:**
7+
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
8+
<!--- Copy/paste the CHANGELOG for this version below. -->
89

910
## PR Checklist
1011
### Basic Validation
1112
Please acknowledge that you have successfully performed the following commands locally:
12-
- [ ] dbt compile
13-
- [ ] dbt run –full-refresh
14-
- [ ] dbt run
15-
- [ ] dbt test
16-
- [ ] dbt run –vars (if applicable)
13+
- [ ] dbt run –full-refresh && dbt test
14+
- [ ] dbt run (if incremental models are present) && dbt test
1715

1816
Before marking this PR as "ready for review" the following have been applied:
19-
- [ ] The appropriate issue has been linked and tagged
20-
- [ ] You are assigned to the corresponding issue and this PR
17+
- [ ] The appropriate issue has been linked, tagged, and properly assigned
18+
- [ ] All necessary documentation and version upgrades have been applied
19+
<!--- Be sure to update the package version in the dbt_project.yml, integration_tests/dbt_project.yml, and README if necessary. -->
20+
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
2121
- [ ] BuildKite integration tests are passing
22+
- [ ] Detailed validation steps have been provided below
2223

2324
### Detailed Validation
24-
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":
25-
- [ ] You have validated these changes and assure this PR will address the respective Issue/Feature.
26-
- [ ] You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
27-
- [ ] You have provided details below around the validation steps performed to gain confidence in these changes.
25+
Please share any and all of your validation steps:
2826
<!--- Provide the steps you took to validate your changes below. -->
2927

30-
### Standard Updates
31-
Please acknowledge that your PR contains the following standard updates:
32-
- Package versioning has been appropriately indexed in the following locations:
33-
- [ ] indexed within dbt_project.yml
34-
- [ ] indexed within integration_tests/dbt_project.yml
35-
- [ ] CHANGELOG has individual entries for each respective change in this PR
36-
<!--- If there is a parallel upstream change, remember to reference the corresponding CHANGELOG as an individual entry. -->
37-
- [ ] README updates have been applied (if applicable)
38-
<!--- Remember to check the following README locations for common updates. →
39-
<!--- Suggested install range (needed for breaking changes) →
40-
<!--- Dependency matrix is appropriately updated (if applicable) →
41-
<!--- New variable documentation (if applicable) -->
42-
- [ ] DECISIONLOG updates have been updated (if applicable)
43-
- [ ] Appropriate yml documentation has been added (if applicable)
44-
45-
### dbt Docs
46-
Please acknowledge that after the above were all completed the below were applied to your branch:
47-
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
48-
4928
### If you had to summarize this PR in an emoji, which would it be?
5029
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
51-
:dancer:
30+
:dancer:

.github/workflows/auto-release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'auto release'
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- main
8+
9+
jobs:
10+
call-workflow-passing-data:
11+
if: github.event.pull_request.merged
12+
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
13+
secrets: inherit

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ target/
99
dbt_modules/
1010
logs/
1111
dbt_packages/
12+
env/
13+
package-lock.yml
1214

1315
### MacOS ###
1416
.DS_Store

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
# dbt_recurly v0.UPDATE.UPDATE
1+
# dbt_recurly v0.4.0
22

3-
## Under the Hood:
3+
[PR #26](https://github.com/fivetran/dbt_recurly/pull/26) includes the following breaking changes:
44

5+
## Feature Updates
6+
- Addition of the `recurly__line_item_enhanced` model. This model constructs a comprehensive, denormalized analytical table that enables reporting on key revenue, subscription, customer, and product metrics from your billing platform. It’s designed to align with the schema of the `*__line_item_enhanced` model found in Recurly, Recharge, Stripe, Shopify, and Zuora, offering standardized reporting across various billing platforms. To see the kinds of insights this model can generate, explore example visualizations in the [Fivetran Billing Model Streamlit App](https://fivetran-billing-model.streamlit.app/). Visit the app for more details.
7+
- This model is currently disabled by default. You may enable it by setting the `recurly__standardized_billing_model_enabled` as `true` in your `dbt_project.yml`.
8+
9+
## Under the Hood:
10+
- Added consistency test within integration_tests for the `recurly__line_item_enhanced` model.
11+
- Included auto-releaser GitHub Actions workflow to automate future releases.
512
- Incorporated the new `fivetran_utils.drop_schemas_automation` macro into the end of each Buildkite integration test job.
6-
- Updated the pull request [templates](/.github).
13+
- Updated the pull request templates.
714

815
# dbt_recurly v0.3.2
916
## 🪲 Bug Fixes 🔧

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- Generate a metrics tables allow you to better understand your account activity over time or at a customer level. These time-based metrics are available on a daily level.
2323
- Generates a comprehensive data dictionary of your source and modeled Recurly data through the [dbt docs site](https://fivetran.github.io/dbt_recurly/).
2424

25+
<!--section="recurly_transformation_model"-->
2526
The following table provides a detailed list of all models materialized within this package by default.
2627
> TIP: See more details about these models in the package's [dbt docs site](https://fivetran.github.io/dbt_recurly/#!/overview?g_v=1).
2728
@@ -33,6 +34,18 @@ The following table provides a detailed list of all models materialized within t
3334
| [recurly__churn_analysis](https://fivetran.github.io/dbt_recurly/#!/model/model.recurly.recurly__churn_analysis) | Each record represents a subscription and their churn status and details. |
3435
| [recurly__monthly_recurring_revenue](https://fivetran.github.io/dbt_recurly/#!/model/model.recurly.recurly__monthly_recurring_revenue) | Each record represents an account and MRR generated on a monthly basis. |
3536
| [recurly__subscription_overview](https://fivetran.github.io/dbt_recurly/#!/model/model.recurly.recurly__subscription_overview) | Each record represents a subscription, enriched with metrics about time, revenue, state, and period. |
37+
| [recurly__line_item_enhanced](https://fivetran.github.io/dbt_recurly/#!/model/model.recurly.recurly__line_item_enhanced) | This model constructs a comprehensive, denormalized analytical table that enables reporting on key revenue, subscription, customer, and product metrics from your billing platform. It’s designed to align with the schema of the `*__line_item_enhanced` model found in Recurly, Recharge, Stripe, Shopify, and Zuora, offering standardized reporting across various billing platforms. To see the kinds of insights this model can generate, explore example visualizations in the [Fivetran Billing Model Streamlit App](https://fivetran-billing-model.streamlit.app/). Visit the app for more details. |
38+
39+
## Example Visualizations
40+
Curious what these models can do? Check out example visualizations from the [recurly__line_item_enhanced](https://fivetran.github.io/dbt_recurly/#!/model/model.recurly.recurly__line_item_enhanced) model in the [Fivetran Billing Model Streamlit App](https://fivetran-billing-model.streamlit.app/), and see how you can use these models in your own reporting. Below is a screenshot of an example report—explore the app for more.
41+
42+
<p align="center">
43+
<a href="https://fivetran-billing-model.streamlit.app/">
44+
<img src="https://raw.githubusercontent.com/fivetran/dbt_recurly/main/images/streamlit_example.png" alt="Streamlit Billing Model App" width="75%">
45+
</a>
46+
</p>
47+
48+
<!--section-end-->
3649

3750
# 🎯 How do I use the dbt package?
3851
## Step 1: Prerequisites
@@ -54,7 +67,7 @@ Include the following recurly_source package version in your `packages.yml` file
5467
```yaml
5568
packages:
5669
- package: fivetran/recurly
57-
version: [">=0.3.0", "<0.4.0"] # we recommend using ranges to capture non-breaking changes automatically
70+
version: [">=0.4.0", "<0.5.0"]
5871
```
5972

6073
Do NOT include the `recurly_source` package in this file. The transformation package itself has a dependency on it and will install the source package as well.
@@ -80,7 +93,15 @@ vars:
8093
8194
```
8295
## (Optional) Step 5: Additional configurations
83-
<details><summary>Expand to view configurations</summary>
96+
<details open><summary>Expand to view configurations</summary>
97+
98+
### Enabling Standardized Billing Model
99+
This package contains the `recurly__line_item_enhanced` model which constructs a comprehensive, denormalized analytical table that enables reporting on key revenue, subscription, customer, and product metrics from your billing platform. It’s designed to align with the schema of the `*__line_item_enhanced` model found in Recurly, Recharge, Stripe, Shopify, and Zuora, offering standardized reporting across various billing platforms. To see the kinds of insights this model can generate, explore example visualizations in the [Fivetran Billing Model Streamlit App](https://fivetran-billing-model.streamlit.app/). For the time being, this model is disabled by default. If you would like to enable this model you will need to adjust the `recurly__standardized_billing_model_enabled` variable to be `true` within your `dbt_project.yml`:
100+
101+
```yml
102+
vars:
103+
recurly__standardized_billing_model_enabled: true # false by default.
104+
```
84105

85106
### Passing Through Additional Fields
86107
This package includes all source columns defined in the macros folder. You can add more columns using our pass-through column variables. These variables allow for the pass-through fields to be aliased (`alias`) and casted (`transform_sql`) if desired, but not required. Datatype casting is configured via a sql snippet within the `transform_sql` key. You may add the desired sql while omitting the `as field_name` at the end and your custom pass-though fields will be casted accordingly. Use the below format for declaring the respective pass-through variables:

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'recurly'
2-
version: '0.3.2'
2+
version: '0.4.0'
33
config-version: 2
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55

docs/catalog.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/index.html

Lines changed: 12 additions & 12 deletions
Large diffs are not rendered by default.

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/run_results.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)