BI-AS-CODE

From transactional data to trusted analytics.

I built an analytics workflow with tested sales models, a published dashboard and an interactive lineage viewer. The viewer lets visitors trace reporting dependencies through reviewed dbt metadata.

01 / Motivation

Analytics should be engineered, not just assembled.

Business reporting often begins with a straightforward request: turn operational data into useful information. As reporting requirements expand, SQL logic can become duplicated, calculations can diverge, and validation can depend heavily on individual developers.

I wanted to apply software engineering practices to analytics development.

02 / Experiment

A transactional database. A modern analytical workflow.

Using Microsoft's fictional AdventureWorks 2022 sample database, I built a workflow that extracts sales data, organizes it into analytical models, validates business metrics and publishes an interactive dashboard.

I focused on correctness, traceability and repeatable execution. I did not measure reporting speed or cost savings.

03 / Architecture

Separate the responsibilities. Verify the handoffs.

  1. 01
    Transactional sourceAdventureWorks 2022 · SQL Server
  2. 02
    Repeatable extractionRead-only Python extraction · Parquet snapshots
  3. 03
    Analytical modelingDuckDB · dbt staging, dimensions, facts and marts
  4. 04
    Quality gatesIndependent reconciliation · automated tests
  5. 05
    PublicationReviewed financial aggregate · separately approved lineage metadata · Next.js
Implemented workflow. The deployed application serves a reviewed financial aggregate and separately approved lineage metadata. Extraction and modeling run outside the application; it does not run SQL Server, DuckDB, dbt or live ingestion.

04 / Outcome

A working system with verifiable results.

The project includes 23 real-source dbt models, documented sales metric contracts, independent reconciliation and a publicly accessible dashboard. The deployed application serves a reviewed financial aggregate and separately approved lineage metadata. Both are historical snapshots; the application does not execute the pipeline or refresh source data.

Review the implementation and evidence

05 / Dashboard

From validated models to a usable view.

These are genuine captures of the published dashboard, based on the historical AdventureWorks 2022 sample. The deployed site serves a reviewed aggregate rather than querying a live database.

AdventureWorks Sales Overview with Data lineage in the navigation, showing $109,846,381 in net line sales, 31,465 orders, $3,491 average order value and 274,914 units sold. All territories and categories are selected.
Sales Overview. Published dashboard with the default historical AdventureWorks sales data (May 2011 to June 2014). Totals include all territories and product categories. View full-size Sales Overview screenshot
AdventureWorks Sales Trends with Data lineage in the navigation and a monthly chart of net line sales and order counts on separate axes. All territories and categories are selected.
Sales Trends. The same historical sales dataset (May 2011 to June 2014), grouped by month. Net line sales use the left axis; order counts use the right axis. View full-size Sales Trends screenshot

06 / Lineage

Trace the models behind the sales summary.

I built the lineage viewer to make reporting dependencies visible alongside the dashboard. Visitors can select a model or source, inspect its details and highlight upstream or downstream dependencies. The viewer uses reviewed dbt metadata, not metadata generated from a production database at runtime.

Explore the lineage viewer Read the lineage documentation
AdventureWorks Data lineage with mart_sales_summary selected in a graph of six dbt models, two sources and nine dependencies. The node list, model details and historical snapshot provenance appear below the graph.
Data Lineage. Reviewed historical dbt-derived dependency graph with mart_sales_summary selected and all dependencies shown. The metadata snapshot is separate from the financial dataset; it does not indicate continuous refresh or a new dbt run. View full-size Data Lineage screenshot

07 / Explore

Two perspectives on one system.