This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
SQL init sentences per session as part of the Sources->Databases configuration #11441
Labels
enhancement:request
Enhancement request submitted by anyone from the community
Is your feature request related to a problem? Please describe.
I have recently had the case of several queries originated in Superset running for around 45 hours in our database server. It seems to me that neither SQLLAB_ASYNC_TIME_LIMIT_SEC or the "STOP" button for asynchronous queries seem to be able to kill the query processing in the database server. I am using PostgreSQL (versions 9.6 and 12.1). In any case, I would rather enforce this timeout in the server using the statement_timeout PostgreSQL parameter. That seems to be a safer way to avoid this problems. I have searched for a way to configure Superset so that it runs a sort of "init query" in every session, but I haven't found one (I must also say I am no expert on Superset, so I apologize in advance if such thing is available or if there is another obvious solution to this).
Describe the solution you'd like
I would like to have "session init queries" as part of the configuration of the Source->Database so that Superset runs some sentences when starting each session (e.g. the update of the statement_timeout parameter in PostgreSQL).
Describe alternatives you've considered
If there is something that I might have done wrong when using the SQLLAB_ASYNC_TIME_LIMIT_SEC parameter, then please help me since that would be an alternative (although I still prefer enforcing the limit in the server).
Additional context
No more context for now.
The text was updated successfully, but these errors were encountered: