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

/api/v1/dataset/{pk}/refresh overrides columns.filterable and columns.groupby to true #24136

Closed
3 tasks done
one-data-cookie opened this issue May 19, 2023 · 3 comments
Closed
3 tasks done
Labels
#bug Bug report

Comments

@one-data-cookie
Copy link

API method /api/v1/dataset/{pk}/refresh overrides columns.groupby and columns.filterable to true regardless of their settings. Surprisingly, this doesn't happen when the same is triggered from UI.

How to reproduce the bug

  1. Create/Use a dataset with columns that have Is filterable and/or Is dimension unticked
  2. Sync columns from source (to see it working from UI)
  3. Call /api/v1/dataset/{pk}/refresh on given dataset (to see it not working via API)

Expected results

Columns are kept untouched (provided there is no change to the underlying query/data, ofc, no matter from where the refresh is triggered.

Actual results

filterable/Is filterable and groupby/Is dimension are changed to true

Screenshots

Before anything.
image

After refreshing from UI.
image

After refreshing via API.
image

Environment

  • superset version: 2.1.0

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@one-data-cookie one-data-cookie added the #bug Bug report label May 19, 2023
@a-othman
Copy link

Hello @one-data-cookie , is this end point "/api/v1/dataset/{pk}/refresh" working with you, cause I can't get it to work with me. it gives me "405 Error: METHOD NOT ALLOWED". I am using a PUT method as per the documentation?

@one-data-cookie
Copy link
Author

@a-othman As far as I know PUT requests are only supported if CSRF tokens are disabled in Superset (WTF_CSRF_ENABLED=False).

@rusackas
Copy link
Member

rusackas commented Mar 4, 2024

I'm not sure if this is still an issue in current versions of Superset (3.x). If it is, we can re-open this, or feel free to open a new issue with updated context and a reproducible case we can try. We're no longer supporting Superset 2.x or prior, and it's been a while since this thread saw any activity, so I'm closing this as stale.

@rusackas rusackas closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

3 participants