Skip to content

Business Intelligence

Flow-Like combines query workflows with A2UI pages, charts, tables, and report delivery. Use it to move from governed source data to a decision-ready view without hiding metric logic inside a chart.

The Flow-Like business-intelligence architecture from governed sources to decisions

LayerResponsibility
SourcesDatabases, files, APIs, and data-lake tables
QueryJoin, filter, aggregate, and shape data
MetricsDefine business meaning, grain, filters, and ownership
PresentationDashboards, tables, exports, and scheduled reports
OperationsRefresh, access, quality checks, and incident ownership

The dashboard is the last layer, not the source of truth. Define and test the underlying query before styling the visualization.

Create one DataFusion session and register the sources required by the analysis:

SourceEntry point
PostgreSQL, MySQL, SQLite, and other databasesDataFusion databases
CSV, JSON, ParquetDataFusion
Delta and Iceberg tablesDataFusion lakes
APIsAPI integrations
Flow-Like local databaseDatabase nodes

Push filters into the source query where possible. Select only the columns and time range needed by the view.

A metric definition should include:

FieldExample
NameNet revenue
Business meaningCaptured sales less refunds
Formulacaptured_amount - refunded_amount
GrainOne row per order
Time field and timezonecaptured_at, Europe/Berlin
Inclusion rulesSuccessful captures only
OwnerFinance Analytics
FreshnessUpdated every hour

Keep the definition next to the workflow or query that implements it. Reuse that logic across dashboards and reports.

For example:

SELECT
DATE_TRUNC('month', captured_at) AS month,
SUM(captured_amount - refunded_amount) AS net_revenue
FROM payments
WHERE status = 'captured'
GROUP BY DATE_TRUNC('month', captured_at)
ORDER BY month;

Validate dates, team IDs, and other user-controlled filters against an allow list or strict parser before constructing query text. Do not concatenate arbitrary input into SQL.

Use Pages to create the route and A2UI components to present the result.

RegionContent
HeaderPage title, freshness timestamp, and important scope
FiltersDate range and a small set of decision-relevant dimensions
KPI rowA few primary metrics with comparison context
Main chartThe most important trend or comparison
Detail tableRecords or grouped values used to explain the chart
Status areaLoading, empty, stale, and error states

The workflow for the page should:

  1. read validated filter values;
  2. run the source queries;
  3. calculate or retrieve governed metrics;
  4. push values to text, chart, and table elements;
  5. update freshness and error states.

Relevant A2UI nodes include Push Data to Chart, Push CSV to Table, and Set Element Text.

QuestionUseful visual
How is a value changing over time?Line chart
How do categories compare?Bar chart
What contributes to a whole?Stacked bar; pie only for a few categories
Where is a process losing volume?Funnel
How do two measures relate?Scatter plot
Which records need action?Sortable, filterable table
Is performance within a target?KPI with target and trend context

Label units, timezones, and aggregation clearly. Avoid dual axes unless the relationship cannot be shown more honestly in separate views.

See Data visualization for chart design guidance.

Treat filters as query inputs:

  • validate the date range and allowed dimension values;
  • use a default that answers a useful question;
  • keep the selected scope visible;
  • use route parameters or query parameters when a view should be shareable;
  • make drill-down navigation preserve enough context to explain how the user arrived there.

A chart interaction may trigger a workflow or navigate to a detail page. The destination should repeat the selected scope and metric definition.

Use an event-driven Flow to produce recurring reports:

  1. query the governed metrics for the reporting window;
  2. compare them with the prior period or target;
  3. render a concise summary and supporting table or chart;
  4. validate that the data is fresh enough to publish;
  5. deliver through the configured channel;
  6. record the run, recipients, and source window.

When the data is incomplete or stale, send an operational alert instead of publishing a confident-looking report.

Add checks before a result reaches the page or report:

  • row count is within an expected range;
  • key fields are non-null and unique;
  • totals reconcile with an authoritative source;
  • the latest source timestamp meets the freshness target;
  • dimension values are recognized;
  • joins do not unexpectedly multiply records;
  • period comparisons use equivalent windows and timezones.

Display freshness and known limitations near the affected metric. A correct chart of incomplete data is still misleading.

  • Aggregate in SQL rather than sending raw event-level data to the page.
  • Select only required fields and rows.
  • Cache or materialize expensive, reusable results where appropriate.
  • Debounce interactive filters.
  • Paginate large detail tables.
  • Separate fast summary queries from slow diagnostic queries.

Scope each source connection to the data the workflow needs. Keep credentials in secrets or provider connections, and review access at the App, Flow, source, and delivery layers.

For sensitive dashboards:

  • avoid putting private fields in client-side page data unless displayed;
  • redact sensitive values from errors and logs;
  • document metric owners and report recipients;
  • keep drill-down routes subject to the same access policy as the summary page.
  • Every metric has a definition, grain, owner, and freshness expectation
  • Filters are validated and visible
  • Dynamic query values are strictly validated or allow-listed
  • The page shows loading, empty, stale, and error states
  • Charts label units, scope, and time
  • Detail data explains the summary
  • Quality checks run before publishing
  • Access is scoped across source, workflow, page, and delivery
  • Expensive queries are bounded or cached