Open susodapop opened 4 years ago
Yup, encountered this problem just today. Using a self hosted version of redash. Any idea of a potential workaround that I can easily implement to circumvent this?
My workaround uses the API. The example here does it, including dynamic dates.
@susodapop Hi, thanks for the reply. I've checked the repo you linked but I'm a bit lost.
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 refresh_dashboard.py
. It updates a whole dashboard of queries.
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. I am actually admin, but I thought I needed to edit some things in the docker and I don't have access to that (nor would I know tf to do anyway).
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: