I haven’t used Cloud Watch personally. And since V9 is not released yet we don’t have documentation for this one.
But its query runner accepts YAML input and passes the key-value-pairs directly into Amazon’s boto3Python adapter. There’s some examples in this SO question. You’ll need to provide a logGroupName. So your query would look like this:
I’m trying out this functionality at the moment with a very recent dev build (commit 733bc1c109f1b72250f67c14cd5fb50d6a46593a on master). I have been able to run a Cloudwatch Log Insights query, specifying an integer value for startTime.
In general, how could an integer value determined from a date be passed in the Redash query?
An example of a value for startTime of 3hrs ago would be
I like the idea of a UDF as the general approach. I’ve had a quick poke around and found some references to UDF support for Big Query. It would be really convenient to be able to embed calls to UDFs in a query, with passing query parameters to the UDF as a bonus.
In the meantime, a periodic API call could be made to manually run a query with a calculated startTime, as you suggest. The obvious downside is that there is another moving part (running process with a schedule, program run from cron, etc.) that needs to be managed.