-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheduled query executions fail when a query uses dynamic date range parameters #4514
Comments
Yup, encountered this problem just today. Using a self hosted version of redash. |
My workaround uses the API. The example here does it, including dynamic dates. |
@susodapop Could you elaborate a bit more in depth how to implement the toolbelt? I'm working on a self hosted instance but the selfhosting itself was made by my company's developer, so I have zero clue what that implies. |
@wtfzambo I'm fixing a couple issues with that script. Will follow-up with you once completed. |
@wtfzambo I made an example using But you can borrow the logic to make a single query updater or whatever you need. This doesn't require you to have admin access to the Redash instance. All you need is your API key (as shown in the video). |
@susodapop yo, thanks a lot for taking the time to make this video, it was really explanatory. So, given that I host my redash inside a VPC in AWS, I guess to make this run on a daily basis I need to make a lambda function inside the same VPC and schedule a cloudwatch event to trigger said lambda. Would that work? |
@wtfzambo You could do that. I usually just add a cron job. |
@susodapop a cron job where? in the redash instance itself? |
@wtfzambo You can run the cron job on any box that has network access to your Redash instance. It can be your laptop, a raspberry pi, a docker container on your NAS or server, a VPS somewhere (kinda like your cloudwatch instance). I usually run them on a raspberry pi. Entirely up to you. You probably wouldn't run it in the Redash Docker container though, since updates down the road might blow away your settings. |
@susodapop aaaah ok! Sorry for the stupid question, I was confused at first because since I'm operating for a business, I would never have considered running a cron on my personal laptop or a raspberry pi :D |
Issue Summary
Since dynamic date ranges are evaluated in the front-end, scheduled executions fail without warning or notice.
Steps to Reproduce
I expect the interface to warn about this behavior. Ideally, we can perform the calculation in the back-end so that scheduled executions can work.
Technical details:
The text was updated successfully, but these errors were encountered: