Hi All,

I have a question, about supplying dynamic variables. I have a query that uses the DQL wrapper for dynamo, I would like to retrieve data between 2 timestamps. The 2 timestamps are calculated by subtracting separate intervals from the current timestamp. i.e. between now - 3 hours and now - 1 hour would return 2 hours worth of data… Or with dynamic variables:

between now()-interval("{{interval}} hours") and now()-interval("{{offset}} hours")

The problem is that I have to perform some arithmetic if I want to retrieve 8 hours of data from 72 hours ago. i.e. i.e. between now - 80 hours and now - 72 hour would return 8 hours worth of data from 72 hours ago.

This is quite tedious and amounts to quite a lot of time if I have to perform many queries. As the DQL wrapper does not allow me to perform arithmetic within the query its self I was hoping there was a way of getting redash to do some arithmetic for me. Has anyone else encountered this problem and solved it?

Best regards,

Christopher