Skip to content
Serverside Pivot

Serverside Pivot

github.com • November 26, 2026

Universal database connectivity via Ibis & DuckDB. Billion-row analytical hierarchy with zero client RAM limits.

Low-Code in 3 Lines • Enterprise Feature Matrix • Interactive Dashboard Showcase • The Core Problem • Quickstart (Dash / React / Streamlit) • Cloud Warehouses (Ibis Pushdown) • Client-Side DuckDB-WASM • Head-to-Head vs. Perspective & AG Grid • Live Demos

🚀 The 3-Step Flow: 2 Lines of Code → Any Database → Interactive Web UI

Building enterprise pivot tables used to take months of backend engineering. With serverside-pivot , you don't write SQL, grouping algorithms, or pagination logic .

Connect any SQL database, cloud warehouse, or local file in 2–3 lines of Python :

Whether your dataset has 10,000 rows or 1,000,000,000+ rows , the engine automatically compiles UI drags, group expansions, and filters into sub-second vector queries. The browser never uses more than 80 MB of RAM .

🖥️ Interactive Dashboard Showcase

Live interactive recordings from our showcase applications ( demo_trader.py , demo_saas.py , demo_hr.py ) demonstrating fluid client interactions, zero RAM bloat, and theme versatility:

1. Bloomberg Black Theme — $\mathcal{O}(D)$ Hierarchical Expand & Collapse with Column Data Bars

Expand and collapse multi-level hierarchies across asset classes, trading desks, and individual instruments with instant server-side aggregation pushdown, zero client RAM pressure, and live proportional column data bars ( demo_trader.py ):

2. Dark Theme — Interactive Graph Creation & Docked Visualizations

Launch the chart builder directly from the toolbar, preview trend, composition, and comparison presets in real time, and dock resizable chart panes side-by-side with your live pivot table ( demo_saas.py ):

3. Light Theme — Inline Cell Charts & Sparkline Drilldown

Embed high-performance inline SVG sparklines (column, area, line) directly inside table cells. Double-click any sparkline cell to open the interactive crosshair detail graph with zoom controls, or adjust chart styles dynamically via the field settings modal ( demo_hr.py ):

✨ Enterprise Feature Matrix

Comprehensive analytical suite surfaced from docs/PIVOT_MASTER_DOCUMENTATION.md :

📌 The Problem with Existing Solutions

When developers build analytical dashboards with large enterprise datasets, they hit one of two walls:

The Solution: serverside-pivot

serverside-pivot gives you the complete full-stack engine out-of-the-box :

Low-Code Universal Connectors : Built on Ibis and DuckDB , it connects natively to Snowflake , BigQuery , ClickHouse , PostgreSQL , Polars , PyArrow , or Parquet with zero SQL boilerplate.

Zero Client Memory Limits : Data is aggregated inside your database engine. The browser only requests lightweight 50-row virtualized slices. Scale to Billions of rows with zero UI stutter.

Tri-Host Universal Runtime : The identical 4-stage runtime ( PivotRuntimeRoot ) runs natively inside Plotly Dash , Streamlit (zero-rerun iframe component), and standalone React .

🥊 Head-to-Head Breakdown

For distributed multi-worker caching with Redis:

For standalone React frontend projects:

2. Plotly Dash (Warehouse & Local Parquet)

3. Enterprise Cloud Warehouses (Zero-Copy Lazy Ibis Pushdown)

Connect directly to Snowflake, BigQuery, PostgreSQL, ClickHouse, MotherDuck, or Databricks with zero memory materialization ( to_pyarrow() or to_pandas() is never called on the base table). Pass a lazy ibis.Table expression or connection config directly:

4. Standalone React (Direct HTTP Transport)

No Python backend required inside the frontend container. Communicates with any V1 HTTP runtime service:

5. Streamlit (Zero-Rerun V2 Component)

Pivoting, scrolling, and expanding tree nodes happen without triggering Streamlit's full Python script rerun:

🏛️ The $\mathcal{O}(D)$ Hierarchical Engine Advantage

Traditional tree tables suffer from the $N$ -Query Waterfall Problem : expanding 100 rows issues 100 separate database queries.

serverside-pivot solves this by grouping all open nodes by their depth level ( $D$ ). It executes a single SQL query per depth level using vectorized OR filters and window functions:

$$\text{Traditional Grids: } \mathcal{O}(N) \text{ queries} \quad \longrightarrow \quad \text{\textbf{serverside-pivot: }} \mathcal{O}(D) \text{ queries (typically 3 to 5 queries total)}$$

Even with thousands of expanded tree nodes over hundreds of millions of raw records, data returns in sub-second time.

☁️ Cloud Data Warehouses & Multi-Backend Ibis Pushdown

serverside-pivot provides enterprise-grade compatibility with cloud data warehouses and distributed SQL engines powered by Ibis . Unlike conventional pivot tools that pull raw tables into server memory ( to_pyarrow() / to_pandas() ), serverside-pivot executes zero-copy lazy pushdown : your data stays entirely within the remote warehouse, and only lightweight 50-row virtualized slices travel across the wire.

1. Zero-Copy Lazy Table Registration

Pass an existing lazy ibis.Table expression directly to normalize_data_input without triggering eager evaluation or memory materialization:

Alternatively, register via a connection dictionary:

2. Supported Cloud Dialects & Capabilities Matrix

The engine inspects dialect capabilities dynamically through BackendCapabilities rather than hardcoding driver checks, guaranteeing deterministic execution across heterogeneous warehouse engines:

3. Dialect Portability & Resilience

Case-Insensitive Filtering : On dialects that do not support native ILIKE (e.g. Google BigQuery, SQLite), expressions automatically fall back to LOWER(column) LIKE LOWER(pattern) without syntax errors.

Tenor & Natural Sorting Fallback : If a database lacks regex substring extraction ( re_extract ), tenor columns ( 1D , 2W , 6M , 1Y ) fall back gracefully to standard lexical ordering.

Bounded Paged Batch Streaming : Cloud warehouses without cursor-level Arrow batch readers export safely using bounded pagination ( .limit(chunk_rows, offset=offset).to_pyarrow() ), preventing OOM failures during multi-gigabyte exports.

TTL Schema Caching : Column names, data types, and nullability are cached in IbisTableCatalog with a configurable TTL ( PIVOT_SCHEMA_CACHE_TTL_SECONDS=300 ) to eliminate redundant INFORMATION_SCHEMA network round-trips.

Non-Blocking Cost Estimation : Query planners bypass expensive live COUNT(*) network queries against cloud warehouses during optimization, defaulting to cost constants unless explicitly enabled.

4. Cloud Governance & Security Controls

Analytical cloud warehouses are configured fail-closed by default to protect production systems:

Read-Only Analytical Pushdown : Remote warehouses reject write-back operations unless explicitly authorized via PIVOT_ALLOW_REMOTE_MUTATIONS=1 or allow_remote_mutations=True .

DDL Protection : Background rollup pre-computation ( MaterializedHierarchyManager ) never executes CREATE TABLE on remote warehouses without explicit opt-in ( PIVOT_ALLOW_REMOTE_DDL=1 ).

Row-ID Independence : Cloud warehouses do not support DuckDB/SQLite internal rowid pseudo-columns. Aggregate edits automatically use key-column aggregate fallbacks.

Parameter Placeholder Adaptation : Parameterized mutations translate dynamically between ? ( qmark ) and %s ( pyformat ) depending on the target warehouse driver.

Cloud Environment Configuration Reference

⚡ Client-Side DuckDB-WASM & Hybrid Execution Mode

While enterprise warehouses handle billions of rows on the backend, small-to-medium analytical views (up to 50,000 rows) or offline datasets do not need server query latency. serverside-pivot introduces a Zero-Network Client-Side Analytical Engine powered by DuckDB-WASM and an in-browser vectorized SQL planner, providing complete bidirectional parity between browser-local and server-side execution.

1. Zero-Boilerplate Hybrid Execution ( execution_mode="auto" )

Use the configure_pivot_execution helper in Python to automatically configure your DashTanstackPivot component. The engine transparently decides whether to compute pivots inside the browser or delegate to the server:

2. Full Architectural Parity in Browser

When running in client mode, ClientPivotTransport executes the identical Pivot Runtime Protocol V1 ( schemaVersion: 1 ) entirely within WebAssembly:

$\mathcal{O}(D)$ Hierarchy Expansions : Multi-level drilldowns expand instantaneously without network requests.

Dynamic Pivot Columns : Column pivoting across multiple dimensions ( colFields ) with automatic row and column grand totals.

Calculated Measures & Formulas : In-browser AST evaluation for calculated measures ( [revenue] - [cost] ) and window functions ( percent_of_grand_total ).

Interactive Visualizations & Charts : Live 2D/3D ECharts docking directly fed from the client DuckDB instance.

Local TSV / Excel Exports : Client-side SheetJS streaming exports generated without server roundtrips.

🛡️ Enterprise Governance: Cancellation, Memory & Security

Native Statement Interruption : Query cancellation triggers DuckDB cursor.interrupt() with worker cleanup acknowledgement fences ( _await_execution_cleanup )—guaranteeing no orphaned queries consume background CPU.

Byte-Bounded LRU Caching : Enforces strict memory quotas using deep byte accounting ( table.nbytes on Arrow, memory_usage(deep=True) on Pandas) with generation token invalidation.

Cancellable Large Exports : Formal async export state machine ( queued → running → cancelling → cancelled/completed ) streaming multi-gigabyte CSV and XLSX files without leaking partial files.

Fail-Closed Verification : Validated with 207 / 207 mapped browser tests against AG Grid Enterprise 36.2.0 SSRM.

Host file downloads support CSV and XLSX across Dash, React, and Streamlit. Clipboard actions provide TSV and HTML . See the operations guide for export limits and the release qualification command, and the certification contract for required evidence.

💻 Live Showcases & Demos

Start with the focused Dash examples to learn the integration patterns:

Basic pivot : a minimal Dash app with row grouping and aggregated measures.

Hierarchical pivot : expandable groups with server-side queries.

SQL multi-instance workspace : multiple pivot instances in one Dash app.

🌟 1. Industry-Specific Showcases (Ready in 1 Command)

Run full-featured, interactive dashboards pre-configured with industry KPIs, customized color palettes, and realistic DuckDB datasets:

🌐 2. Multi-Framework Host Architecture

To run the flagship Revenue Operations workspace (12,000 rows) across Dash, React, and Streamlit:

Distributed under the MIT License . See LICENSE for details.