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. |
0 replies
|
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 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The api I'm using (Azure Billing API) requires date range to be sent in the json body of the request:
{ "type": "Usage", "timeframe": "Custom", "timePeriod": { "from": "2021-05-17T20:48:09.000Z", "to": "2021-05-17T20:48:09.000Z" }, "dataset": { "granularity": "None", "aggregation": { "totalCost": { "name": "PreTaxCost", "function": "Sum" } }, "grouping": [ { "type": "Dimension", "name": "ResourceGroup" } ] } }It would be really nice to be able to use the date macro's in the json body like so:
All reactions