-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Drill-by alert "Failed to load dimensions for drill by" using Gamma role #30233
Comments
@LaurenceLong Hello there! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. I'm looking forward to working with you! To resolve the "Failed to load dimensions for drill by" error when using the Gamma role in Apache Superset, ensure the following:
Here is a relevant code snippet that handles the loading of drill-by options and the error handling: useEffect(() => {
async function loadOptions() {
const datasetId = Number(formData.datasource.split('__')[0]);
try {
setIsLoadingColumns(true);
let response: JsonResponse;
if (loadDrillByOptions) {
response = await loadDrillByOptions(datasetId, formData);
} else {
response = await cachedSupersetGet({
endpoint: `/api/v1/dataset/${datasetId}?q=${queryString}`,
});
}
const { json } = response;
const { result } = json;
setDataset(result);
setColumns(
ensureIsArray(result.columns)
.filter(column => column.groupby)
.filter(
column =>
!ensureIsArray(
formData[drillByConfig?.groupbyFieldName ?? ''],
).includes(column.column_name) &&
column.column_name !== formData.x_axis &&
ensureIsArray(excludedColumns)?.every(
excludedCol => excludedCol.column_name !== column.column_name,
),
),
);
} catch (error) {
logging.error(error);
supersetGetCache.delete(`/api/v1/dataset/${datasetId}`);
addDangerToast(t('Failed to load dimensions for drill by'));
} finally {
setIsLoadingColumns(false);
}
}
if (handlesDimensionContextMenu && hasDrillBy) {
loadOptions();
}
}, [
addDangerToast,
drillByConfig?.groupbyFieldName,
excludedColumns,
formData,
handlesDimensionContextMenu,
hasDrillBy,
]); By ensuring the dataset exists, the Gamma role has the necessary permissions, the endpoint is correct, and the database is accessible, you can mitigate the occurrence of the 404 error and the "Failed to load dimensions for drill by" alert [1][2]. |
I just add all_datasource_access to Gamma role and it works. |
Bug description
When using Gamma role:
F12 log showed:
xxxx:8088/api/v1/dataset/5 404 (NOT FOUND)
Permissions added to Gamma following: #27029
How to reproduce the bug
Create dashboard using admin role
View dashboard using gamma role -> drill-by
Screenshots/recordings
No response
Superset version
4.0.2
Python version
3.11
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: