{"record":{"id":"8dcbb8de79672422","repo":"influxdata/influxdb","slug":"tried-accessing-table-that-do-not-exist","errorCode":null,"errorMessage":"tried accessing table that do not exist","messagePattern":"tried accessing table that do not exist","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/write_buffer/mod.rs","lineNumber":116,"sourceCode":"    #[error(\"error in last cache: {0}\")]\n    LastCacheError(#[from] last_cache::Error),\n\n    #[error(\"database not found {db_name:?}\")]\n    DatabaseNotFound { db_name: String },\n\n    #[error(\"table not found {table_name:?} in db {db_name:?}\")]\n    TableNotFound { db_name: String, table_name: String },\n\n    #[error(\"tried accessing database that does not exist\")]\n    DbDoesNotExist,\n\n    #[error(\"tried creating database named '{0}' that already exists\")]\n    DatabaseExists(String),\n\n    #[error(\"cannot write to soft-deleted database '{0}' - it is marked for deletion\")]\n    DatabaseDeleted(String),\n\n    #[error(\"tried accessing table that do not exist\")]\n    TableDoesNotExist,\n\n    #[error(\"table '{db_name}.{table_name}' already exists\")]\n    TableAlreadyExists {\n        db_name: Arc<str>,\n        table_name: Arc<str>,\n    },\n\n    #[error(\"tried accessing column with name ({0}) that does not exist\")]\n    ColumnDoesNotExist(String),\n\n    #[error(\n        \"updating catalog on delete of last cache failed, you will need to delete the cache \\\n        again on server restart\"\n    )]\n    DeleteLastCache(#[source] CatalogError),\n\n    #[error(\"error from wal: {0}\")]","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/write_buffer/mod.rs#L98-L134","documentation":"Indicates an operation tried to access a table that does not exist in the database. The write buffer's catalog lookup could not resolve the requested table name. Thrown for reads/queries or operations that require an existing table rather than implicitly creating one.","triggerScenarios":"Querying or accessing a table (measurement) name that was never written to or was deleted; calling APIs that require an existing table schema without having written any data for it first.","commonSituations":"Typo in measurement name; querying a table before the first write creates it; environment drift where the table exists in prod but not in a fresh test instance.","solutions":["Verify the exact table name via SHOW TABLES / information_schema","Write data with that measurement first so the table is created","Correct the typo or outdated table name in your query/config","Recreate the table by re-sending historical line protocol"],"exampleFix":"// before\nSELECT * FROM 'cpu_usage'  // table does not exist yet\n// after\n// write some points first, or use the correct name:\nSELECT * FROM 'cpu'","handlingStrategy":"validation","validationCode":"let exists = catalog.table_exists(db_name, table_name);\nif !exists {\n    // write first to create the table, or fix the name\n}","typeGuard":"fn is_table_missing(err: &WriteBufferError) -> bool {\n    matches!(err, WriteBufferError::TableDoesNotExist)\n}","tryCatchPattern":null,"preventionTips":["Verify table names with SHOW TABLES before querying","Keep measurement names in shared constants to avoid typos","Write seed data after creating a fresh database before querying"],"tags":["table","not-found","influxdb3","query"],"backgroundTag":"entity-not-found","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}