Is your feature request related to a problem? Please describe.
Currently the Redshift datasource is only capable of handling single-statement queries because we always use the ExecuteStatement API call, for which the docs say "This statement must be a single SQL statement." This prevents the use of stored procedures, which must be called like this:
BEGIN;
CALL get_result_set(1, 'mycursor');
FETCH ALL FROM mycursor;
END;
Describe the solution you'd like
We should add support for queries like this by parsing the given query to see if it contains multiple statements and if so using the BatchExecuteStatement API call instead.
Describe alternatives you've considered
It may be possible to execute queries like this against Redshift using the PostgreSQL datasource in Grafana, but this can only be accomplished using user+password authentication; these must either be long-term, creating security concerns, or short-term, leading to usability issues as they must be updated frequently in Grafana.
Is your feature request related to a problem? Please describe.
Currently the Redshift datasource is only capable of handling single-statement queries because we always use the ExecuteStatement API call, for which the docs say "This statement must be a single SQL statement." This prevents the use of stored procedures, which must be called like this:
Describe the solution you'd like
We should add support for queries like this by parsing the given query to see if it contains multiple statements and if so using the BatchExecuteStatement API call instead.
Describe alternatives you've considered
It may be possible to execute queries like this against Redshift using the PostgreSQL datasource in Grafana, but this can only be accomplished using user+password authentication; these must either be long-term, creating security concerns, or short-term, leading to usability issues as they must be updated frequently in Grafana.