dosubot[bot] commented on issue #36683:
URL: https://github.com/apache/superset/issues/36683#issuecomment-3662824750

   <!-- Answer -->
   You're right—this is a known frontend bug: clearing the schema field in the 
UI doesn't actually clear it in the PUT payload, so the backend keeps the old 
value. This happens because the frontend only updates the schema if the new 
value is non-empty, so clearing it in the UI doesn't propagate to the state or 
the API call. That's why manually editing the PUT request works as 
expected—sending `"schema": null` (or omitting the field) lets the backend 
clear it properly [[issue 
#33573](https://github.com/apache/superset/issues/33573)].
   
   For bulk-fixing, you can use the Superset API to update datasets by sending 
a PUT request with `"schema": null` for each affected dataset. If you script 
this, make sure to include a valid CSRF token and only allowed fields in the 
payload (see [discussion 
#36409](https://github.com/apache/superset/discussions/36409) for a Python 
snippet to clean the payload). This will let you clear the schema field across 
multiple datasets until the UI bug is fixed.
   
   
   <!-- 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/df347f86-8228-412b-bd6a-c0602445841a?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/df347f86-8228-412b-bd6a-c0602445841a?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/df347f86-8228-412b-bd6a-c0602445841a?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/df347f86-8228-412b-bd6a-c0602445841a?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/df347f86-8228-412b-bd6a-c0602445841a?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/df347f86-8228-412b-bd6a-c0602445841a?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/df347f86-8228-412b-bd6a-c0602445841a?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20right%E2%80%94this%20is%20a%20known%20frontend%20bug%3A%20clearing%20the%20schema%20field%20in%20the%20UI%20doesn%27t%20actually%20clear%20it%20in%20the%20PUT%20payload%2C%20so%20the%20backend%20keeps%20the%20old%20value.%20This%20happens%20because%20the%20frontend%20only%20updates%20the%20schema%20if%20the%20new%20value%20is%20non-empty%2C%20so%20clearing%20it%20in%20the%20UI%20doesn%27t%20propagate%20to%20the%20state%20or%20the%20API%20call.%20That%27s%20why%20manually%20editing%20the%20PUT%20request%20works%20as%20expected%E2%80%94sending%20%60%22schema%22%3A%20null%60%20%28or%20omitting%20the%20field%29%20lets%20the%20backend%20clear%20it%20properly%20%5B%5Bissue%20%2333573%5D%28https%3A//github.com/apache/superset/issues/33573%29%5D
 
.%0A%0AFor%20bulk-fixing%2C%20you%20can%20use%20the%20Superset%20API%20to%20update%20datasets%20by%20sending%20a%20PUT%20request%20with%20%60%22schema%22%3A%20null%60%20for%20each%20affected%20dataset.%20If%20you%20script%20this%2C%20make%20sure%20to%20include%20a%20valid%20CSRF%20token%20and%20only%20allowed%20fields%20in%20the%20payload%20%28see%20%5Bdiscussion%20%2336409%5D%28https%3A//github.com/apache/superset/discussions/36409%29%20for%20a%20Python%20snippet%20to%20clean%20the%20payload%29.%20This%20will%20let%20you%20clear%20the%20schema%20field%20across%20multiple%20datasets%20until%20the%20UI%20bug%20is%20fixed.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![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/36683)


-- 
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]

Reply via email to