Visualizations And Pipelines¶
BrickflowUI 0.1.6 expands beyond basic dashboard charts. The goal is to let a data team represent operational reality directly: pipelines, freshness, failures, cost, triage, chatbot assistants, and executive signals.
Chart Selection Guide¶
Use these defaults:
AreaChartfor volume, throughput, and long-running trends.LineChartfor SLA, latency, freshness, and rate trends.BarChartfor comparisons by team, layer, or pipeline.DonutChartfor status mix, ownership mix, or risk mix.ComposedChartfor mixed views like runs plus success rate plus cost.ScatterChartfor cost vs duration, rows vs failures, or anomaly views.GaugeChartfor one big health score, freshness score, or reliability score.RadarChartfor capability scorecards.Heatmapfor failures by time and layer.FunnelChartfor stage drop-off or validation gates.TreeMapfor cost, storage, table size, or workload concentration.
Pipeline Graphs¶
PipelineGraph accepts plain dictionaries, so it works well with Databricks SQL query results or mock data while prototyping.
nodes = [
{"id": "source", "label": "Source API", "layer": "source", "status": "healthy"},
{"id": "bronze", "label": "Bronze Events", "layer": "bronze", "status": "running"},
{"id": "silver", "label": "Silver Quality", "layer": "silver", "status": "watch"},
{"id": "gold", "label": "Gold Marts", "layer": "gold", "status": "healthy"},
]
edges = [
{"from": "source", "to": "bronze"},
{"from": "bronze", "to": "silver"},
{"from": "silver", "to": "gold"},
]
selected, set_selected = db.use_state("No node selected")
db.PipelineGraph(
nodes=nodes,
edges=edges,
title="Lakehouse Flow",
on_node_click=lambda node: set_selected(f"{node['label']} is {node['status']}"),
)
Chatbot UI Pattern¶
Use ChatMessage and ChatInput when you want an assistant/copilot surface around your dashboard.
prompt, set_prompt = db.use_state("")
answer, set_answer = db.use_state("Ask about pipeline risk.")
db.Column(
[
db.ChatMessage("assistant", answer, name="Ops Copilot"),
db.ChatInput(
value=prompt,
on_change=set_prompt,
on_submit=lambda value: set_answer(f"Reviewing: {value}"),
),
]
)
State And Events¶
Interactive components use the same event model as the rest of BrickflowUI:
ChatInput.on_changereceives the current text.ChatInput.on_submitreceives the submitted text.PipelineGraph.on_node_clickreceives the clicked node dictionary.KanbanBoard.on_card_clickreceives the clicked card dictionary plus its column.- Chart
on_clickcallbacks receive the clicked chart payload where the underlying chart provides one. Heatmap.on_clickreceives the clicked cell dictionary.
Recommended Example¶
Run:
cd examples/pipeline_observability_015
python app.py
This example shows pipeline graphs, multiple controls, chatbot UI, chart variety, heatmaps, kanban triage, and table export in one Databricks-ready app.