Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FillMode per query #26

Closed
andresmgot opened this issue Jul 26, 2021 · 1 comment · Fixed by #27
Closed

Support FillMode per query #26

andresmgot opened this issue Jul 26, 2021 · 1 comment · Fixed by #27

Comments

@andresmgot
Copy link
Collaborator

andresmgot commented Jul 26, 2021

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 ?

@kminehart
Copy link
Collaborator

Yeah that sounds great! An optional argument makes total sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants