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

Use a variable to add (or auto add) time range in druid SQL #98

Open
raakasf opened this issue Jul 7, 2021 · 0 comments
Open

Use a variable to add (or auto add) time range in druid SQL #98

raakasf opened this issue Jul 7, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@raakasf
Copy link
Collaborator

raakasf commented Jul 7, 2021

Currently, when using druid SQL users have to add the time window (see below) to the WHERE clause.

AND __time >= MILLIS_TO_TIMESTAMP(${__from}) AND __time <= MILLIS_TO_TIMESTAMP(${__to})

It would be nice if one could use $timefilter or something similar to what the postgres plugin provides (see https://grafana.com/docs/grafana/latest/variables/variable-types/global-variables/#timefilter-or-__timefilter).

It would be awesome if we could have some druid SQL parser (Druid Query Toolkit provides functions like addToWhere) to automatically add the above time window to users SQL.

@raakasf raakasf added the enhancement New feature or request label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant