Skip to content

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

@raakasf

Description

@raakasf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions