Skip to main content

Free, web-based visualizer for Bruin CLI pipelines with impact analysis and run history tracking

Project description

Bruin Visualizer

Free, web-based visualizer for Bruin CLI pipelines with impact analysis and run history tracking

License: MIT PyPI version

What This Does

A standalone web-based visualizer for Bruin data pipelines. Visualize your pipeline DAG, analyze asset criticality, and track run history - all locally without requiring Bruin Cloud.

Features

  • Interactive DAG Visualization - D3.js force-directed graph with zoom, pan, and drag
  • Impact Analysis - Automated criticality scoring (0-10 scale) with downstream dependency tracking
  • Run History Tracking - Track asset performance over time with SQLite storage
  • Performance Trends - Sparkline charts showing duration trends, failure patterns, and alerts
  • Asset Metadata - View descriptions, owners, tags, column definitions, and materialization info
  • Search - Multi-field search with keyboard shortcuts (Ctrl+K)

Installation

pip install bruin-visualizer

For DuckDB row count tracking (optional):

pip install bruin-visualizer[duckdb]

Quick Start

1. Run your pipeline with tracking

bruin-viz run ./pipeline --start-date 2019-01-01 --end-date 2019-01-31

This runs your pipeline and records execution history in bruin_history.db.

2. Generate the pipeline graph

bruin-viz parse ./pipeline

This generates pipeline_graph.json with your pipeline structure and impact analysis.

3. View the visualization

bruin-viz serve

Opens the visualizer at http://localhost:8001

CLI Commands

bruin-viz parse

Parse a Bruin pipeline and generate visualization data:

bruin-viz parse ./pipeline
bruin-viz parse ./pipeline -o custom_output.json

bruin-viz serve

Start the visualization web server:

bruin-viz serve
bruin-viz serve --port 8080
bruin-viz serve --no-browser  # Don't auto-open browser

bruin-viz run

Run a Bruin pipeline with history tracking:

bruin-viz run ./pipeline --start-date 2024-01-01 --end-date 2024-01-31
bruin-viz run ./pipeline --full-refresh --workers 4
bruin-viz run ./pipeline --db custom_history.db

bruin-viz init

Initialize bruin-visualizer in current directory:

bruin-viz init
bruin-viz init -o ./visualizer

Use Cases

Pre-Deployment Impact Analysis

"I need to change stg_yellow_tripdata. What breaks?"

  1. Click the asset in the visualizer
  2. See: HIGH impact (9.6/10), affects 8 assets, 2 production reports
  3. Export impact report
  4. Share with team

Performance Monitoring

"Is this asset getting slower over time?"

  1. Click the asset
  2. View sparkline chart showing duration trends
  3. See alerts if 40% slower than baseline
  4. Review recent run history

Finding Assets Quickly

"Where's the monthly revenue report?"

  1. Press Ctrl+K
  2. Type "monthly revenue"
  3. Click result
  4. See full details + impact

Using as a Library

from bruin_visualizer import BruinParser, BruinRunHistory

# Parse pipeline
parser = BruinParser("./pipeline")
graph = parser.build_full_pipeline_graph()

# Calculate impact
impact = parser.calculate_impact_analysis(graph, "staging.stg_yellow_tripdata")
print(f"Criticality: {impact['criticality_score']}/10")
print(f"Affects {len(impact['total_downstream'])} downstream assets")

# Track runs
history = BruinRunHistory("bruin_history.db")
runs = history.get_recent_runs("my-pipeline", limit=10)

Requirements

  • Python 3.7+
  • Bruin CLI installed and in PATH
  • PyYAML (automatically installed)
  • DuckDB (optional, for row count tracking)

Technology Stack

  • Frontend: D3.js (force-directed graph), vanilla JavaScript
  • Backend: Python http.server (standard library)
  • Database: SQLite (via Python sqlite3)
  • Dependencies: PyYAML

Project Structure

After installation, you can use bruin-visualizer from anywhere:

your-project/
├── pipeline/              # Your Bruin pipeline
├── pipeline_graph.json    # Generated by 'bruin-viz parse'
└── bruin_history.db       # Generated by 'bruin-viz run'

Contributing

Contributions welcome! See GitHub repository for details.

License

MIT License - feel free to use, modify, and distribute.

Acknowledgments

  • Built for Bruin data pipelines
  • Visualization powered by D3.js

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bruin_visualizer-0.1.0.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bruin_visualizer-0.1.0-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file bruin_visualizer-0.1.0.tar.gz.

File metadata

  • Download URL: bruin_visualizer-0.1.0.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for bruin_visualizer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7bdf50088b502dd7f48d9ce4885db31de84482d13c1e667936c9a199d72d17aa
MD5 09e2c5d97a9b815b41958d5066681f5b
BLAKE2b-256 fb783612e741f87fbcb9ea604de70b07e168fbff05a88ec5814f2ab17256d92e

See more details on using hashes here.

File details

Details for the file bruin_visualizer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bruin_visualizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5adfaaac95c8b74361787d20d01248f982f1aaaa610c4c0aebedeaae511c48a
MD5 19bd8ad19c14c6f9106e5c0e938a5900
BLAKE2b-256 7a67af75dcd869041bbf047937e8a3f8709f9bcb95e3d23283c5f5d6fbb7894f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page