{"record":{"id":"1e3e3b074c4b123e","repo":"apache/superset","slug":"the-provided-table-was-not-found-in-the-provided-d","errorCode":null,"errorMessage":"The provided table was not found in the provided database","messagePattern":"The provided table was not found in the provided database","errorType":"exception","errorClass":"WarmUpCacheTableNotFoundError","httpStatus":404,"severity":"error","filePath":"superset/commands/dataset/warm_up_cache.py","lineNumber":69,"sourceCode":"            ChartWarmUpCacheCommand(\n                chart,\n                self._dashboard_id,\n                self._extra_filters,\n            ).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":51,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/dataset/warm_up_cache.py#L51-L79","documentation":"WarmUpCacheTableNotFoundError is raised by DatasetWarmUpCacheCommand.validate() when the query joining SqlaTable to Database on database_name == db_name and table_name == table_name yields nothing. The lookup is by exact names, not ids, and it is not schema-scoped, so both names must match a registered dataset exactly.","triggerScenarios":"POST /api/v1/dataset/warm_up_cache (or the chart 'warm up' action) with a db_name/table_name pair that doesn't correspond to any dataset row — wrong casing, unqualified vs qualified table name, or a table that was never added as a dataset.","commonSituations":"Calling cache warm-up after renaming the database or table without updating callers. Passing the physical schema-qualified name ('schema.table') where only the bare table_name is stored. The table exists in the DB engine but no SqlaTable dataset row exists yet.","solutions":["List the exact dataset: GET /api/v1/dataset?q=(table_name:eq:<name>) and read the database name from the result; use those exact strings.","If the table is not a dataset yet, create it first (POST /api/v1/dataset) then warm up.","Match casing exactly — the filter is an equality on stored strings.","Pass bare table_name, not schema-qualified, unless that's how it is stored."],"exampleFix":"# before\nPOST /api/v1/dataset/warm_up_cache\n{\"db_name\": \"prod-db\", \"table_name\": \"analytics.public.sales\"}\n# 404 The provided table was not found\n\n# after\n{\"db_name\": \"prod-db\", \"table_name\": \"sales\"}","handlingStrategy":"validation","validationCode":"resp = client.get('/api/v1/dataset?q=(table_name:eq:%s)' % table_name).json()\nmatch = [r for r in resp[\"result\"] if r[\"database\"][\"database_name\"] == db_name]\nassert match, \"no dataset for (db_name, table_name); create it first\"","typeGuard":null,"tryCatchPattern":"try:\n    DatasetWarmUpCacheCommand(db_name, table_name, None, None).run()\nexcept WarmUpCacheTableNotFoundError:\n    register_dataset(db_name, table_name)  # then retry once","preventionTips":["Warm up by values read from the dataset list API, never hardcoded strings.","Match stored casing exactly and use the bare table_name.","Ensure the table has an actual dataset row — warm-up is dataset-scoped, not engine-scoped."],"tags":["dataset","cache","warm-up","not-found","api"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}