Maps a dashboard filter to a query variable within a card.
This schema establishes the connection between a dashboard-level filter and the query variable it controls within a specific card. When the filter value changes, it is passed to the query as the specified variable.
Transform
The optional transform field allows value transformation before passing to
the query variable. Common use cases:
- Date range filters that need to split into
start_dateandend_datevariables - Type coercion (e.g., string to integer)
- Default value override
Example transform config:
{
"type": "date_range_start",
"format": "YYYY-MM-DD"
}
Summary
Types
@type t() :: %Lotus.Storage.DashboardCardFilterMapping{ __meta__: term(), card: Lotus.Storage.DashboardCard.t() | Ecto.Association.NotLoaded.t(), card_id: term(), filter: Lotus.Storage.DashboardFilter.t() | Ecto.Association.NotLoaded.t(), filter_id: term(), id: term(), inserted_at: DateTime.t(), transform: map() | nil, updated_at: DateTime.t(), variable_name: String.t() }