Bug description

  1. Go to the dataset page
  2. Select a dataset and switch it to virtual
  3. Save
  4. Switch it back to a physical dataset

Expected

Dataset switches back to physical

Actual

Dataset remains virtual

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

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 and here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report ๐Ÿ› | Other  Join Discord Share on X

Comment From: geido


๐ŸŽ‰ Preset Bounty Available: $150 USD ๐ŸŽ‰

To claim this bounty, please carefully follow the steps below.


๐Ÿ“‹ Steps to Participate

  1. Review Guidelines:
    Read through the Preset Bounty Program Contribution Guide for complete details on bounty requirements.

  2. Show Your Interest:
    Complete the Preset Bounty Program Survey and comment this issue to express your interest.

  3. Join the Slack Channel:
    After completing the survey, youโ€™ll receive an invitation to the dedicated Apache Superset Slack channel.

  4. Get Assigned:
    To officially start, ensure a Bounty Program Manager has assigned you to this issue.

  5. Submit Your Solution:
    When ready, submit your solution with the Fixes #{issue_number} notation in your Pull Request description.

  6. Claim Your Bounty:
    Sign up at GitPay.me and submit your solution via: https://gitpay.me/#/task/1215


๐Ÿ’ก Additional Notes

  • Only developers assigned by a Bounty Program Manager should start working on this issue to win the bounty.
  • Be sure to follow the guide closely to avoid any delays in payment. Please, allow a few days after your PR has been merged for the bounty to be released.

Good luck, and happy coding! ๐ŸŽ‰

Comment From: denji932

@msyavuz I have reproduced the issue and would like to work on it could you assign it to me. Thanks