Skip to content

A dashboard on a FastAPI backend

2 · Your backend

Source on GitHub · Guide

No frame and no DuckDB-WASM: the components of this page send their queries to a FastAPI server, one POST per batch, and draw its answers. They name measures and dimensions (no table attribute): the server knows what they mean, checks each query and applies row-level security for the viewer. It is the server of the playground, used as it is.

This server answers named measures only. An endpoint can also accept SQL expressions written in the page (table="orders" measure="sum(revenue)"), checked then turned into SQL by the server, and queries it holds by their names: see SQL expressions and named queries.

  • Revenue by country

  • Revenue by week

  • Discount rate by month and channel

  • Orders by category

  • Revenue by channel

  • Average order value by category