Hi all,

I'd like to open discussion on SIP-244: showing how old the data behind a
dashboard is.

Superset tells users when a query last ran ("Cached 5 minutes ago", "Last
queried at"), but not how old the data behind it is. When warehouse tables
are rebuilt every few hours, a chart queried two minutes ago can still show
six-hour-old data, and users can't tell the difference.

The proposal makes freshness a dataset setting: either a timestamp column
(Superset runs MAX(column) with the viewer's RLS) or a read-only SQL query,
e.g. against a pipeline run log, plus an optional "warn after N minutes"
threshold. Dashboards opt in, and show "Data as of <time>" in the header
(oldest dataset wins, with a per-dataset tooltip) and in each chart's menu.
It's behind DATA_FRESHNESS_ENABLED (off by default), needs no DB migration,
and embedded hosts opt in through dashboardUiConfig.

The SQL mode is held to the same bar as virtual-dataset SQL: read-only,
access-checked when saved, and RLS applied when it runs (fail closed).

Three open questions I'd especially like input on:
1. Should virtual datasets inherit freshness from the tables they read?
2. Is running cold-cache lookups one after another OK for a first
version, or should they go through async queries / cache warm-up?
3. Is a "Test" button in the dataset editor worth a new endpoint?

SIP: https://github.com/apache/superset/issues/46623
Reference PR (draft, working prototype):
https://github.com/apache/superset/pull/46610
Original discussion: https://github.com/apache/superset/discussions/46027

Would love to hear your thoughts.

Thanks,
Brian (Brian-Kariu)

Reply via email to