Guide
Stripe Analytics Pipeline with BigQuery
Build a three-layer Stripe analytics pipeline in about 20 minutes. Initialize the stripe-bigquery template, ingest Stripe billing data, model MRR, publish revenue reports, and serve a dashboard locally.
What
Build a working Stripe analytics pipeline in BigQuery from a template, then put a dashboard on top of it. You will end up with 19 assets across three layers and four report tables you can query or chart.
stripe_raw- six Stripe resources loaded byingestr: customers, products, prices, subscriptions, subscription items, and invoicesstripe_stage- nine typed models, including an insert-only daily MRR snapshotstripe_reports- MRR by customer, MRR movements, subscription KPIs, and invoice billingsdashboards/- a Dashboards as Code file you serve locally onlocalhost:8321
Everything here runs on open-source CLIs on your own machine. The only costs are your BigQuery storage and query usage.
How
bruin init stripe-bigquery writes the whole project. You then run one layer at a time, check the data after each one, serve the dashboard with the dac CLI, and finish by using a coding agent to add your own reports.
The template targets BigQuery, but the models are ordinary SQL. Moving them to Snowflake, Databricks, ClickHouse, Redshift, or Postgres is a refactor, not a rewrite - the last step covers the prompt that does it.
Before you start
- A Stripe secret key (
sk_test_...orsk_live_...) - A Google Cloud project with BigQuery enabled and a service account JSON key that can create datasets and tables
- Git installed
- A coding agent such as Claude Code, Cursor, or Codex for the last step
Guide overview
- 1Set Up Your EnvironmentInstall the Bruin CLI and DAC, connect the Bruin MCP, and initialize the template in a Git repo.
- 2Run the Ingestion LayerLoad six Stripe resources into BigQuery with ingestr, then verify the raw data three ways.
- 3Run the Staging LayerBuild nine conformed models: typing, flattened metadata, joined prices, MRR rules, and daily snapshots.
- 4Run the Reports LayerPublish MRR, movement, KPI, and invoice-billing reports, then validate the whole pipeline.
- 5Serve the Dashboard LocallyValidate, check, and serve the DAC billing dashboard on localhost against your own warehouse.
- 6Extend It With an AgentAdd reports, customize the dashboard, port the models to another warehouse, and choose a deployment.
Resources
Get help & contribute