filter by $__timeFilter using jsonata #315
-
|
Greetings given the following sample data How can one filter by the date range selected? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
yesoreyeram
May 16, 2022
Replies: 1 comment 7 replies
-
|
@yosiasz - In your case, I would prefer something like this parse-json
| jsonata "*[date>=${__from:date:seconds} and date<=${__to:date:seconds}]"
| extend "date"=unixtime_seconds_todatetime("date")
| order by "date" ascLet me know if this solves your issue or if you find any bug with the implementation. |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
yosiasz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


@yosiasz -
$__timeFilteris not a macro in infinity. Typically, SQL datasources in grafana uses that macro and they are aware how to expand that. But infinity is a generic plugin and doesn't aware how to expand that macro.In your case, I would prefer something like this
Let me know if this solves your issue or if you find any bug with the implementation.