Recharge dbt Package
This dbt package transforms data from Fivetran's Recharge connector into analytics-ready tables.
Resources
- Number of materialized models¹: 38
- Connector documentation
- dbt package documentation
What does this dbt package do?
This package enables you to better understand your Recharge data by summarizing customer, revenue, and subscription trends. It creates enriched models with metrics focused on billing history, customer details, and subscription analytics.
Output schema
Final output tables are generated in the following target schema:
<your_database>.<connector/schema_name>_recharge
Final output tables
By default, this package materializes the following final tables:
| Table | Description |
|---|---|
| recharge__billing_history | Tracks order-level billing history with charge details including order and charge prices, subtotals, discounts, refunds, taxes, shipping costs, and item quantities to analyze order value and fulfillment patterns. Example Analytics Questions:
|
| recharge__charge_line_item_history | Chronicles individual line item transactions including charges, refunds, discounts, shipping, and taxes by line item type to provide granular visibility into charge components and calculations. Example Analytics Questions:
|
| recharge__customer_daily_rollup | Provides daily customer transaction snapshots with realized and running totals for orders, charges, discounts, taxes, refunds, and item quantities to track customer spending evolution and lifetime value trends. Example Analytics Questions:
|
| recharge__customer_details | Consolidates customer profiles with comprehensive transaction metrics including order counts, amounts, subscription counts, discounts, taxes, refunds, and monthly averages to understand customer lifetime value and engagement patterns. Example Analytics Questions:
|
| recharge__monthly_recurring_revenue | Tracks monthly recurring revenue (MRR) and non-MRR by customer including recurring order counts, one-time order counts, net recurring charges, and net one-time charges to measure subscription business health and revenue trends. Example Analytics Questions:
|
| recharge__subscription_overview | Provides detailed subscription profiles with customer info, product details, pricing, subscription status, billing intervals, charge counts, and schedule information to monitor subscription lifecycle and billing patterns. Example Analytics Questions:
|
| recharge__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 Recharge, Recurly, 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. Visit the app for more details. |
An example churn model is separately available in the analysis folder:
| analysis model | description |
|---|---|
| recharge__account_churn_analysis | Each record represents a customer and their churn reason according to recharge's documentation. |
¹ Each Quickstart transformation job run materializes these models if all components of this data model are enabled. This count includes all staging, intermediate, and final models materialized as view, table, or incremental.
Visualizations
Many of the above reports are now configurable for visualization via Streamlit. Check out some sample reports here.
Prerequisites
To use this dbt package, you must have the following:
- At least one Fivetran Recharge connection syncing data into your destination.
- A BigQuery, Snowflake, Redshift, PostgreSQL, or Databricks destination.
How do I use the dbt package?
You can either add this dbt package in the Fivetran dashboard or import it into your dbt project:
- To add the package in the Fivetran dashboard, follow our Quickstart guide.
- To add the package to your dbt project, follow the setup instructions in the dbt package's README file to use this package.
How is this package maintained and can I contribute?
Package Maintenance
The Fivetran team maintaining this package only maintains the latest version of the package. We highly recommend you stay consistent with the latest version of the package and refer to the CHANGELOG and release notes for more information on changes across versions.
Contributions
A small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions.
We highly encourage and welcome contributions to this package. Learn how to contribute to a package in dbt's Contributing to an external dbt package article.
Opinionated Modelling Decisions
This dbt package takes an opinionated stance on revenue is calculated, using charges in some cases and orders in others. If you would like a deeper explanation of the logic used by default in the dbt package, you may reference the DECISIONLOG.
