{"record":{"id":"ba5bd8af0981cad3","repo":"apache/superset","slug":"you-don-t-have-access-to-this-dataset-ba5bd8","errorCode":null,"errorMessage":"You don't have access to this dataset.","messagePattern":"You don't have access to this dataset\\.","errorType":"exception","errorClass":"DatasetAccessDeniedError","httpStatus":403,"severity":"error","filePath":"superset/commands/dataset/warm_up_cache.py","lineNumber":73,"sourceCode":"            ).run()\n            for chart in self._charts\n        ]\n\n    def validate(self) -> None:\n        table = (\n            db.session.query(SqlaTable)\n            .join(Database)\n            .filter(\n                Database.database_name == self._db_name,\n                SqlaTable.table_name == self._table_name,\n            )\n        ).one_or_none()\n        if not table:\n            raise WarmUpCacheTableNotFoundError()\n        try:\n            security_manager.raise_for_access(datasource=table)\n        except SupersetSecurityException as ex:\n            raise DatasetAccessDeniedError() from ex\n        self._charts = (\n            db.session.query(Slice)\n            .filter_by(datasource_id=table.id, datasource_type=table.type)\n            .all()\n        )\n","sourceCodeStart":55,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/dataset/warm_up_cache.py#L55-L79","documentation":"DatasetAccessDeniedError is raised by DatasetWarmUpCacheCommand.validate() when security_manager.raise_for_access(datasource=table) throws a SupersetSecurityException. Unlike the editorship errors, this is a read-level access check: the user must be able to access the datasource (via dataset access, database access, RLS-permitting rules, or all-datasource-access) for cache warming to proceed.","triggerScenarios":"POST /api/v1/dataset/warm_up_cache for a dataset the user has no datasource access to — e.g. a Gamma user restricted by 'datasource access' grants that don't include this table.","commonSituations":"Onboarding scripts warming caches for all datasets with a limited service account. Users who can see charts (embedded) but lack direct dataset access trying to trigger warm-up. RLS rules that effectively deny the datasource.","solutions":["Grant the user's role 'datasource access on <db>.<schema>.<table>' (or database access / all-datasource-access for broader needs).","Run warm-up as an Admin or a user who can already explore that dataset.","Verify access beforehand with a explore/data-context call or security_manager.can_access_datasource."],"exampleFix":"# before\nPOST /api/v1/dataset/warm_up_cache  (auth: gamma_limited)\n# -> You don't have access to this dataset.\n\n# after: grant in Roles -> Action menus, or\nclient.post(\"/api/v1/permission/add\", ...)  # add datasource access grant, then retry","handlingStrategy":"validation","validationCode":"from superset import security_manager\n\ntable = find_dataset(db_name, table_name)\ntry:\n    security_manager.raise_for_access(datasource=table)\nexcept SupersetSecurityException:\n    request_datasource_grant(table)","typeGuard":null,"tryCatchPattern":"try:\n    DatasetWarmUpCacheCommand(db_name, table_name, dashboard_id, None).run()\nexcept DatasetAccessDeniedError:\n    skip_and_log(db_name, table_name)  # batch warmers: continue with others","preventionTips":["Warm caches with a role holding all-datasource-access or per-datasource grants.","For batch jobs, catch-and-continue so one denied dataset doesn't abort the run.","Grant the minimum: 'datasource access on db.schema.table'."],"tags":["permissions","rbac","dataset","cache","access"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}