You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "an3uryzm (via GitHub)" <gi...@apache.org> on 2025/06/28 16:17:16 UTC
[I] Changing metric currency breaks physical dataset [superset]
an3uryzm opened a new issue, #33964:
URL: https://github.com/apache/superset/issues/33964
### Bug description
Steps to reproduce:
1. Open physical dataset
2. Create metric with name "test" and sql expression = 1
3. Save dataset
4. Edit dataset again: set metric currency for this metric as Prefix + USD
5. Save dataset
6. Edit dataset again: check "test" metric and notice that prefix and currency are empty
7. Set metric currency to Prefix + USD again
8. Try to save dataset and you receive error
From now on you can't save dataset without this error. Only removing this metric completely let you save dataset.
### Screenshots/recordings

### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
This bug occures in development mode on version 5.0.0 installed locally via docker compose.
### 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.
- [ ] 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] Changing metric currency breaks physical dataset [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33964:
URL: https://github.com/apache/superset/issues/33964#issuecomment-3018820870
<!-- Answer -->
The recent "fix: Dataset currency" PR (#33682) was merged on June 6, 2025, which is after the 5.0.0 release (June 23, 2023), so it is not included in 5.0.0. This PR specifically addresses the migration of the metric currency field to a new JSON structure and backend validation, which matches the root cause of the issue you described. To get this fix, you'll need a version that includes PR #33682 or later.
[See PR details](https://github.com/apache/superset/pull/33682)
<!-- 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/89c61830-327f-4497-9e60-ddaba6aebb42?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/89c61830-327f-4497-9e60-ddaba6aebb42?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/89c61830-327f-4497-9e60-ddaba6aebb42?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/89c61830-327f-4497-9e60-ddaba6aebb42?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/89c61830-327f-4497-9e60-ddaba6aebb42?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/89c61830-327f-4497-9e60-ddaba6aebb42?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/89c61830-327f-4497-9e60-ddaba6aebb42?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/33964)
--
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] Changing metric currency breaks physical dataset [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33964:
URL: https://github.com/apache/superset/issues/33964#issuecomment-3015655950
<!-- Answer -->
This issue is caused by a recent change where the metric currency field was migrated from a simple string to a nested JSON object with `symbol` and `symbolPosition`, and the backend now strictly validates these fields. The frontend UI for editing metrics in physical datasets does not fully support this new structure—when you edit and save a metric, the currency field can be lost or corrupted, leading to a schema validation error that blocks further saves unless you remove the problematic metric. This is a known gap after the recent "fix: Dataset currency" PR and related UI changes ([source](https://github.com/apache/superset/pull/33682), [source](https://github.com/apache/superset/blob/2e9939baf253e607a54722b1996baaf625e72133/superset/datasets/schemas.py)).
There isn't a documented workaround yet, but you can unblock yourself by removing the affected metric and recreating it. Editing the dataset JSON directly via the API (ensuring the currency field is a valid object with both `symbol` and `symbolPosition`) may also work, but the UI will likely continue to drop or corrupt the field until a fix is released.
This is not tracked in any existing issue or documentation, but it is a direct result of the recent schema and UI changes. If you need to keep using metric currencies, you may want to hold off on editing metrics in the UI until a fix lands.
<!-- 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/bfff3f9d-3d62-4170-9c85-4ea2156bd323?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/bfff3f9d-3d62-4170-9c85-4ea2156bd323?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/bfff3f9d-3d62-4170-9c85-4ea2156bd323?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/bfff3f9d-3d62-4170-9c85-4ea2156bd323?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bfff3f9d-3d62-4170-9c85-4ea2156bd323?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/bfff3f9d-3d62-4170-9c85-4ea2156bd323?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bfff3f9d-3d62-4170-9c85-4ea2156bd323?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/33964)
--
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] Changing metric currency breaks physical dataset [superset]
Posted by "an3uryzm (via GitHub)" <gi...@apache.org>.
an3uryzm closed issue #33964: Changing metric currency breaks physical dataset
URL: https://github.com/apache/superset/issues/33964
--
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] Changing metric currency breaks physical dataset [superset]
Posted by "an3uryzm (via GitHub)" <gi...@apache.org>.
an3uryzm commented on issue #33964:
URL: https://github.com/apache/superset/issues/33964#issuecomment-3036844768
Done, it looks the issue is fixed on master branch. Will wait for the next release. Gonna close the issue then
--
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] Changing metric currency breaks physical dataset [superset]
Posted by "an3uryzm (via GitHub)" <gi...@apache.org>.
an3uryzm commented on issue #33964:
URL: https://github.com/apache/superset/issues/33964#issuecomment-3018816718
@dosu
Does the recent "fix: Dataset currency" fixes this issue? If so, did 5.0.0 release https://github.com/apache/superset/releases/tag/5.0.0 was released with this fix ?
--
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] Changing metric currency breaks physical dataset [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33964:
URL: https://github.com/apache/superset/issues/33964#issuecomment-3020060088
If you could validate on `master` branch, it would be appreciated. This PR will be in the next release (whether 5.0.1, 5.1.0 or 6.0.0)
--
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