Replies: 2 comments
-
Also interested in having these macros as variables for Grafana dashboards. My use case involves SQL queries sent as payloads so it would save from having to call a time format conversion function in the SQL server. I could translate expressions (contained in the request body) such as: SQL *
FROM datasource
WHERE __time >= MILLIS_TO_TIMESTAMP(${__from}) AND __time < MILLIS_TO_TIMESTAMP(${__to}) into SQL *
FROM datasource
WHERE __time >= '${__isoFrom}') AND __time < '${__isoTo}' And also saving computation on the SQL server side. |
Beta Was this translation helpful? Give feedback.
-
Same here. I am using surrealdb, which has build-in rest/websockets endpoints. Currently I have to do timerange conversions with a translator (node-RED) in between. Trying to decypher the code, is it not just a matter of calling |
Beta Was this translation helpful? Give feedback.
-
The api I'm using (Azure Billing API) requires date range to be sent in the json body of the request:
It would be really nice to be able to use the date macro's in the json body like so:
Beta Was this translation helpful? Give feedback.
All reactions