Bruin Academy

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 by ingestr: customers, products, prices, subscriptions, subscription items, and invoices
  • stripe_stage - nine typed models, including an insert-only daily MRR snapshot
  • stripe_reports - MRR by customer, MRR movements, subscription KPIs, and invoice billings
  • dashboards/ - a Dashboards as Code file you serve locally on localhost: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_... or sk_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

Get help & contribute

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Accept cookies to load it.