GitHub user dosubot[bot] added a comment to the discussion: Saved Dataset 
Removes SQL Parameters, Preventing Chart Creation

<!-- Answer -->
In Superset version 4, there was a known issue with SQL parameter handling in 
datasets, which was addressed in version 4.1.0. A patch titled "fix: Pre-query 
normalization with custom SQL" was introduced to resolve this issue. You can 
find more details about this update in the pull request 
[#30389](https://github.com/apache/superset/pull/30389).

For code-level changes, the `ParsedQuery` class in the `superset/sql_parse.py` 
module is responsible for SQL parameter parsing and substitution. This class is 
utilized by the `execute_sql_statement` function in `superset/sql_lab.py`, 
which handles SQL execution 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/sql_lab.py)</sup>.

If you haven't already, consider updating to Superset version 4.1.0 to benefit 
from the patch. If the issue persists, reviewing the `ParsedQuery` class and 
related functions might provide insights into further adjustments or 
customizations needed for your specific use case.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*

---
<sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/0c15e22d-4bd4-4c57-84d8-e53f3525c13b?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/0c15e22d-4bd4-4c57-84d8-e53f3525c13b?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/0c15e22d-4bd4-4c57-84d8-e53f3525c13b?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/0c15e22d-4bd4-4c57-84d8-e53f3525c13b?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/0c15e22d-4bd4-4c57-84d8-e53f3525c13b?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/0c15e22d-4bd4-4c57-84d8-e53f3525c13b?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/0c15e22d-4bd4-4c57-84d8-e53f3525c13b?feedback_type=other)</sup>


GitHub link: 
https://github.com/apache/superset/discussions/33011#discussioncomment-12741250

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to