dosubot[bot] commented on issue #29575:
URL: https://github.com/apache/superset/issues/29575#issuecomment-2225666591
<!-- Greeting -->
Hey @JatinVenkatesh! I'm here to assist you with any bugs, questions, or
contributions you have regarding Superset. I'll help you while we wait for a
human maintainer to look into your issue.
<!-- Answer -->
The `DISALLOWED_SQL_FUNCTIONS` error in Apache Superset version 4.0.2 is due
to the introduction of a new configuration setting that restricts the use of
certain SQL functions. This setting is used to enhance security by disallowing
potentially unsafe SQL functions.
To resolve this issue, you can modify the `DISALLOWED_SQL_FUNCTIONS` setting
in your Superset configuration to allow the functions you need. Here is an
example of how to adjust this setting:
```py
DISALLOWED_SQL_FUNCTIONS: dict[str, set[str]] = {
"postgresql": {"version", "query_to_xml", "inet_server_addr",
"inet_client_addr"},
"clickhouse": {"url"},
"mysql": {"version"},
}
```
You can remove or modify the functions listed under `"postgresql"` to fit
your requirements. For instance, if you need to allow the `version` function,
you can update the configuration as follows:
```py
DISALLOWED_SQL_FUNCTIONS: dict[str, set[str]] = {
"postgresql": {"query_to_xml", "inet_server_addr", "inet_client_addr"},
"clickhouse": {"url"},
"mysql": {"version"},
}
```
Additionally, ensure that your database permissions and configurations are
correctly set to allow the execution of the required SQL functions.
For more details, you can refer to the relevant configuration documentation
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/config.py)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]