You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rudak (via GitHub)" <gi...@apache.org> on 2026/01/07 08:48:03 UTC

[I] Error saving dataset The schema of the submitted payload is invalid. [superset]

rudak opened a new issue, #36946:
URL: https://github.com/apache/superset/issues/36946

   ### Bug description
   
   When editing a dataset and configuring a column to display a currency suffix, I encounter a validation error when saving the dataset.
   
   Steps:
   
   Go to a dataset -> Edit  -> Edit a Metrics column
   
   Set the Metric currency with:
   
   symbol position: suffix
   symbol: EUR
   
   Save the dataset
   
   At this point, saving fails with the following error:
   
   Error saving dataset
   The schema of the submitted payload is invalid.
   
   Length must be between 1 and 128.: 
   `{"0":"{","1":"'","2":"s","3":"y","4":"m","5":"b","6":"o","7":"l","8":"'","9":":","10":" ","11":"'","12":"E","13":"U","14":"R","15":"'","16":",","17":" ","18":"'","19":"s","20":"y","21":"m","22":"b","23":"o","24":"l","25":"P","26":"o","27":"s","28":"i","29":"t","30":"i","31":"o","32":"n","33":"'","34":":","35":" ","36":"'","37":"s","38":"u","39":"f","40":"f","41":"i","42":"x","43":"'","44":"}","symbolPosition":"suffix","symbol":"EUR"}`
   
   <img width="897" height="670" alt="Image" src="https://github.com/user-attachments/assets/ebbffc81-d967-47f7-bcb2-8631ef885fe4" />
   
   It looks like the UI submits a JSON object for the currency configuration, but the backend schema expects a string with a maximum length of 128 characters. The payload appears to be interpreted character by character instead of as a valid string.
   
   Version
   
   Superset 5.0.0
   
   ### Screenshots/recordings
   
   ``
   
   ### Superset version
   
   5.0.0
   
   ### Python version
   
   3.11
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] 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.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error saving dataset The schema of the submitted payload is invalid. [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #36946:
URL: https://github.com/apache/superset/issues/36946#issuecomment-3930507018

   PR approved!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error saving dataset The schema of the submitted payload is invalid. [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on issue #36946:
URL: https://github.com/apache/superset/issues/36946#issuecomment-3801252921

   @rusackas I think @richardfogaca had a pr recently for dynamic currencies


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error saving dataset The schema of the submitted payload is invalid. [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #36946:
URL: https://github.com/apache/superset/issues/36946#issuecomment-3717887844

   <!-- Greeting -->
   Hi @rudak! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
   
   <!-- Answer -->
   This error is caused by a mismatch between what the backend expects for the metric currency configuration and what the frontend is sending. The backend expects the currency field to be a JSON object with two string properties—symbol and symbolPosition—each between 1 and 128 characters in length. However, the error and the way the payload is interpreted suggest that the frontend is sending a stringified object or otherwise mis-serializing the currency configuration, so the backend tries to validate each character as if it were a string field, resulting in the "Length must be between 1 and 128" error for each character in the payload. You can see the backend schema and validation logic here: [schemas.py](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/datasets/schemas.py#L77-L93), [api.py](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/datasets/api.py#L190-L447), and [models.py](https://github.c
 om/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/connectors/sqla/models.py#L1043-L1117).
   
   Recent pull requests have improved metric editing and validation in the frontend, which may address this issue ([PR #36760](https://github.com/apache/superset/pull/36760), merged 2026-01-06). If possible, try upgrading to the latest version of Superset, as these changes may resolve the serialization and validation mismatch.
   
   As a workaround in your current version, you could try manually editing the metric's currency configuration in the dataset's JSON metadata (if accessible), ensuring it matches the expected object structure:
   
   ```json
   "currency": {
     "symbol": "EUR",
     "symbolPosition": "suffix"
   }
   ```
   
   If you continue to encounter this error after upgrading, it may be worth reviewing how the frontend is serializing the currency field or checking for any customizations that could affect this behavior.
   
   
   <!-- 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/914c5a6a-aed2-469e-b1ba-b65c166c10d9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/914c5a6a-aed2-469e-b1ba-b65c166c10d9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/914c5a6a-aed2-469e-b1ba-b65c166c10d9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/914c5a6a-aed2-469e-b1ba-b65c166c10d9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/914c5a6a-aed2-469e-b1ba-b65c166c10d9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/914c5a6a-aed2-469e-b1ba-b65c166c10d9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/914c5a6a-aed2-469e-b1ba-b65c166c10d9?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=This%20error%20is%20caused%20by%20a%20mismatch%20between%20what%20the%20backend%20expects%20for%20the%20metric%20currency%20configuration%20and%20what%20the%20frontend%20is%20sending.%20The%20backend%20expects%20the%20currency%20field%20to%20be%20a%20JSON%20object%20with%20two%20string%20properties%E2%80%94symbol%20and%20symbolPosition%E2%80%94each%20between%201%20and%20128%20characters%20in%20length.%20However%2C%20the%20error%20and%20the%20way%20the%20payload%20is%20interpreted%20suggest%20that%20the%20frontend%20is%20sending%20a%20stringified%20object%20or%20otherwise%20mis-serializing%20the%20currency%20configuration%2C%20so%20the%20backend%20tries%20to%20validate%20each%20character%20as%20if%20it%20were%20a%20string%20field%2C%20resulting%20in
 %20the%20%22Length%20must%20be%20between%201%20and%20128%22%20error%20for%20each%20character%20in%20the%20payload.%20You%20can%20see%20the%20backend%20schema%20and%20validation%20logic%20here%3A%20%5Bschemas.py%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/datasets/schemas.py%23L77-L93%29%2C%20%5Bapi.py%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/datasets/api.py%23L190-L447%29%2C%20and%20%5Bmodels.py%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/connectors/sqla/models.py%23L1043-L1117%29.%0A%0ARecent%20pull%20requests%20have%20improved%20metric%20editing%20and%20validation%20in%20the%20frontend%2C%20which%20may%20address%20this%20issue%20%28%5BPR%20%2336760%5D%28https%3A//github.com/apache/superset/pull/36760%29%2C%20merged%202026-01-06%29.%20If%20possible%2C%20try%20upgrading%20to%20the%20latest%20version%20of%20Superset%2C%20as%
 20these%20changes%20may%20resolve%20the%20serialization%20and%20validation%20mismatch.%0A%0AAs%20a%20workaround%20in%20your%20current%20version%2C%20you%20could%20try%20manually%20editing%20the%20metric%27s%20currency%20configuration%20in%20the%20dataset%27s%20JSON%20metadata%20%28if%20accessible%29%2C%20ensuring%20it%20matches%20the%20expected%20object%20structure%3A%0A%0A%60%60%60json%0A%22currency%22%3A%20%7B%0A%20%20%22symbol%22%3A%20%22EUR%22%2C%0A%20%20%22symbolPosition%22%3A%20%22suffix%22%0A%7D%0A%60%60%60%0A%0AIf%20you%20continue%20to%20encounter%20this%20error%20after%20upgrading%2C%20it%20may%20be%20worth%20reviewing%20how%20the%20frontend%20is%20serializing%20the%20currency%20field%20or%20checking%20for%20any%20customizations%20that%20could%20affect%20this%20behavior.)&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/36946)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error saving dataset The schema of the submitted payload is invalid. [superset]

Posted by "richardfogaca (via GitHub)" <gi...@apache.org>.
richardfogaca closed issue #36946: Error saving dataset The schema of the submitted payload is invalid.
URL: https://github.com/apache/superset/issues/36946


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error saving dataset The schema of the submitted payload is invalid. [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #36946:
URL: https://github.com/apache/superset/issues/36946#issuecomment-3800961671

   Let us know if the bot suggestion helped... if not, maybe @kgabryje can help here, as he's worked on the currency bits in the past. @msyavuz can you recall who was working on the updated currency handling?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Error saving dataset The schema of the submitted payload is invalid. [superset]

Posted by "richardfogaca (via GitHub)" <gi...@apache.org>.
richardfogaca commented on issue #36946:
URL: https://github.com/apache/superset/issues/36946#issuecomment-3801599413

   I'm working on a fix @rusackas @msyavuz


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org