Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to update dataset metric's label via the rest PUT api #17390

Closed
xingyuli opened this issue Nov 10, 2021 · 3 comments · Fixed by #17620
Closed

unable to update dataset metric's label via the rest PUT api #17390

xingyuli opened this issue Nov 10, 2021 · 3 comments · Fixed by #17620
Assignees
Labels
api Related to the REST API #bug Bug report need:more-info Requires more information from author

Comments

@xingyuli
Copy link

It's not possible to update dataset metric's label (i.e., verbose_name) via the PUT API.

How to reproduce the bug

Visit the online rest documentation. You could see the payload is not able to receive verbose_name:

image

Expected results

Possible to update the metric label (verbose_name).

Actual results

Unable to do so.

Screenshots

See above.

Environment

(please complete the following information):

  • browser type and version:
  • superset version: 1.1.0(which I'm using), and the latest version from the online rest doc
@xingyuli xingyuli added the #bug Bug report label Nov 10, 2021
@junlincc
Copy link
Member

Hi @xingyuli, thanks for reporting the issue!
I'm not familiar with this functionality - edit dataset via the rest PUT api. While I loop the domain expert in, would you mind giving some more details 1) your use case 2) is there a workaround that you may be aware of? thanks

@junlincc junlincc added api Related to the REST API need:more-info Requires more information from author labels Nov 10, 2021
@xingyuli
Copy link
Author

xingyuli commented Nov 11, 2021

Hi @xingyuli, thanks for reporting the issue! I'm not familiar with this functionality - edit dataset via the rest PUT api. While I loop the domain expert in, would you mind giving some more details 1) your use case 2) is there a workaround that you may be aware of? thanks

The rest PUT API has been used to sync from one dataset to another dataset. These two datasets refer two tables which are created by absolutely same ddl statement. You may think of these datasets as blue-green (or prod-vs-backup) version against each other. I have so many datasets created via the GUI, but I wish to programmatically maintain the plenty of datasets.

As it's not possible to specify the metric's label (verbose_name) via the API, I have to update them one by one, going through all the datasets, which is quite time consuming and inconvenient. As far as I see, I think there is no workaround to do this.

For wider insight, Superset is missing features of sync one set of datasets to another set of datasets, which would be useful for cases e.g.,

  • blue-green dataset
  • full dataset and its hot dataset (which means a subset of whole dataset)

@villebro
Copy link
Member

villebro commented Dec 1, 2021

Repro'd - working on this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the REST API #bug Bug report need:more-info Requires more information from author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants