Url data source

Hi,

I have to find top x problems (by day, week or month) in clickhouse table.
My idea is to create a python script that will collect the data, find linear regression coefficients, sort them descending, and return top x?
That python script can be behind some mini web server like bottle, or flask.

So from redash I should get the parametar for time intervals (day/week/month), send that parametar to python script behind web server. Python script should return, problem id’s, and than redash should collect all data with these problem id’s in order to show the trend graph.

Is that type of interaction between python script, web server and redash possible?

Regards.

Yes, that sounds feasible. In fact, Redash doesn’t care if you use Python / Node / Ruby / PHP to return the content using the URL data source. Your web server just needs to return data from an HTTP endpoint in Redash’s format.

Hi susodapop,

do you have any clue how to send parameters from redash to python script behind web server?
I will have to construct url based on redash parameters.

For example, if my redash parameters are date_from = ‘2019-06-01’ and date_to = ‘2019-06-30’, I need something http://my_python_script?date_from=2019-06-01&date_to=2019-06-30

How to generate such url dynamically from inside of redash?

Regards.