Some of the existing data sources (e.g. PostgreSQL) support to specify a fill mode but just for the current query. The $__timeGroup macro of PostgreSQL states: $__timeGroup(dateColumn,'5m', 0), $__timeGroup(dateColumn,'5m', previous), $__timeGroup(dateColumn,'5m', NULL), being the third argument the fill mode.
As far as I can see, using sqlds is only possible to setup the fill mode globally for the datasource.
My suggestion would be to add an optional FillMissing struct to the Query and conditionally use that one (taking precedence over the Datasource fill mode). WDYT @kminehart ?
Some of the existing data sources (e.g. PostgreSQL) support to specify a fill mode but just for the current query. The
$__timeGroup
macro of PostgreSQL states:$__timeGroup(dateColumn,'5m', 0)
,$__timeGroup(dateColumn,'5m', previous)
,$__timeGroup(dateColumn,'5m', NULL)
, being the third argument the fill mode.As far as I can see, using
sqlds
is only possible to setup the fill mode globally for the datasource.My suggestion would be to add an optional
FillMissing
struct to theQuery
and conditionally use that one (taking precedence over the Datasource fill mode). WDYT @kminehart ?