`/api/v1/dataset/{pk}/refresh` overrides `columns.filterable` and `columns.groupby` to `true`
one-data-cookie opened this issue · 3 comments
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
- Create/Use a dataset with columns that have
Is filterable
and/orIs dimension
unticked - Sync columns from source (to see it working from UI)
- 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
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.
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?
@a-othman As far as I know PUT
requests are only supported if CSRF tokens are disabled in Superset (WTF_CSRF_ENABLED=False
).
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.