Skip to content
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

Added support for running scripts as queries #139

Merged
merged 3 commits into from
Mar 18, 2014
Merged

Added support for running scripts as queries #139

merged 3 commits into from
Mar 18, 2014

Conversation

erans
Copy link
Contributor

@erans erans commented Mar 17, 2014

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.

Added support for a connection type called 'url'.

It allows settings URL to retrieve JSON results with the same format as other query runners.
To run a query, the query itself needs to be the URL.
If CONNECTION_STRING is set it will be used as the base URL to which the query is appended. In that case it will enforce that the query is a relative path to the base URL set in CONNECTION_STRING.

arikfr added a commit that referenced this pull request Mar 18, 2014
Added support for running scripts as queries
@arikfr arikfr merged commit 8c80e99 into getredash:master Mar 18, 2014
christophervalles pushed a commit to hailocab/redash that referenced this pull request May 8, 2014
Added support for running scripts as queries
washort pushed a commit to washort/redash that referenced this pull request Jul 25, 2017
dairyo pushed a commit to KiiCorp/redash that referenced this pull request Mar 1, 2019
Added support for running scripts as queries
dairyo pushed a commit to KiiCorp/redash that referenced this pull request Mar 1, 2019
Added support for running scripts as queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants