dosubot[bot] commented on issue #33906: URL: https://github.com/apache/superset/issues/33906#issuecomment-3004629808
<!-- Answer --> This looks like a frontend bug: when you clear the SQL field to switch a dataset from virtual back to physical, the frontend likely isn't sending an explicit `sql: null` in the update payload. The backend expects `sql: null` to make the dataset physical again—if the field is omitted or sent as an empty string, the backend keeps the previous SQL and the dataset stays virtual. There are no backend constraints blocking this transition, and no existing tickets or docs about this issue were found. The workaround is to ensure the update request includes `"sql": null` when clearing the SQL field, but this may require a code or API call until the UI is fixed. More details on the backend logic can be found [here](https://github.com/apache/superset/blob/a13a5907966aea2e800d9f925e93db5755c4b975/superset/datasets/api.py) and [here](https://github.com/apache/superset/blob/a13a5907966aea2e800d9f925e93db5755c4b975/superset/connectors/sqla/models.py). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/918eae27-b4a4-467b-9ffb-2e6040122b2e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/918eae27-b4a4-467b-9ffb-2e6040122b2e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/918eae27-b4a4-467b-9ffb-2e6040122b2e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/918eae27-b4a4-467b-9ffb-2e6040122b2e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/918eae27-b4a4-467b-9ffb-2e6040122b2e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/918eae27-b4a4-467b-9ffb-2e6040122b2e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/918eae27-b4a4-467b-9ffb-2e6040122b2e?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33906) -- 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]
