EverythingMe/redash — pull request #139 by erans (2014-03-17 14:43:23+00:00)
Title: Added support for running scripts as queries

Added a new connection type called 'script'.

It allows running scripts that returns the same JSON format as other data sources. The data is received by printing it to the standard output.

To configure it CONNECTION_STRING must be a path under which the scripts exist. Each script must be flagged for execution.

To run a script create a new query and enter the filename of the script (the path will be automatically concatenated).

Safety Features:
* Runs without shell (shell=False)
* Will only run scripts in the configured directory (or something that resides in a subdirectory).
* If the scripts folder is sufficiently protected and only authorized personnel can add scripts to it - it should be relatively safe.