QuerySpec: choose the returned fields #5

Closed
opened 2026-10-29 18:31:58 +00:00 by Gilles · 0 comments
Owner

For Argus's metric charts (argus/frontend#30, monitoring plan): a chart needs two columns (date, value), but a QuerySpec without group_by returns every registered field of the model.

Scope

  • Optional "fields": ["at", "value"] in a QuerySpec: the columns returned (and their order) when there's no group_by; each must be in the model's fields whitelist. Absent = today's behaviour (all of them).
  • Refused together with group_by / aggregates (those already define the columns).
  • README and tests.
For Argus's metric charts (argus/frontend#30, monitoring plan): a chart needs two columns (date, value), but a QuerySpec without `group_by` returns every registered field of the model. ## Scope - Optional `"fields": ["at", "value"]` in a QuerySpec: the columns returned (and their order) when there's no `group_by`; each must be in the model's `fields` whitelist. Absent = today's behaviour (all of them). - Refused together with `group_by` / `aggregates` (those already define the columns). - README and tests.
Sign in to join this conversation.
No description provided.