influxdata/influxdb · error · CatalogError
Table not in DB schema for
Error message
Table {table_name} not in DB schema for {db_name} What it means
Thrown when an operation references a table that does not exist in the given database's schema. The catalog found the database (`db_name`) but no table named `table_name` within it, so the query/write/DDL is rejected.
Solutions
- Confirm the table exists in that specific database: SHOW TABLES (or information_schema)
- Fix the table/measurement name in the query or write (watch casing and typos)
- Create the table explicitly (CREATE TABLE) if implicit creation is not enabled
- Check whether the table was deleted and restore/recreate it if needed
Example fix
// before: querying table in wrong DB SELECT * FROM "cpu" -- executed on db 'logs' // after: use the database that owns the table SELECT * FROM "metrics"."cpu"
Defensive patterns
Strategy: validation
Validate before calling
const tables = await client.getTables(dbName);
if (!tables.includes(tableName)) throw new Error(`table '${tableName}' missing in '${dbName}'`); Type guard
function tableExists(t: string | null | undefined): t is string { return typeof t === 'string' && knownTables(t).length > 0; } Try / catch
try {
return await client.query(`SELECT * FROM "${db}"."${table}"`);
} catch (e) {
if (/Table .* not in DB schema/.test(String(e.message))) {
return []; // or create the table / redirect to correct db
} throw e;
} Prevention
- Qualify queries with both database and table names explicitly
- Treat measurement renames as breaking changes; update all clients in lockstep
- For optional writes, enable implicit table creation or create tables via migration scripts
When it happens
Trigger: SELECT/DROP/ALTER on a misspelled or deleted table; a write targeting a table (measurement) in the wrong database; implicit table creation disabled while writing to a new measurement name.
Common situations: Pointing a client at a different database than where the table lives; table dropped by cleanup; renaming a measurement without updating downstream queries; case-sensitivity mismatches.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- table not found in db
- cannot add column because it already exists with type
- column id in series key should be valid
- Database not found
- Field type mismatch on table
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/fc76aa0339bb01ff.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_catalog/src/error.rs:177
"Update to schema would exceed the field limit ({limit}) for field family '{field_family}'"
)]
TooManyFields { field_family: String, limit: usize },
#[error("Update to schema would exceed the field family limit of {0}")]
TooManyFieldFamilies(usize),
#[error(
"table '{table_name}' in storage mode {storage_mode:?} cannot allocate more legacy column IDs"
)]
LegacyColumnIdsExhausted {
table_name: Arc<str>,
storage_mode: StorageMode,
},
#[error("Database not found {}", db_name)]
DatabaseNotFound { db_name: Arc<str> },
#[error("Table {} not in DB schema for {}", table_name, db_name)]
TableNotFound {
db_name: Arc<str>,
table_name: Arc<str>,
},
#[error(
"Field type mismatch on table {} column {}. Existing column is {} but attempted to add {}",
table_name,
column_name,
existing,
attempted
)]
FieldTypeMismatch {
table_name: String,
column_name: String,
existing: InfluxColumnType,
attempted: InfluxColumnType,
},View on GitHub (pinned to 06200ef96b)