Budibase/budibase · error
Table ID is unknown, cannot find table
Error message
Table ID is unknown, cannot find table
What it means
ExternalRequest (the SQL/external-datasource row pipeline in Budibase server) resolves a table from an ID via getTable. External table IDs are composite (datasourceId:tableName), so if tableId is undefined/empty the code cannot even parse it, and it throws this error immediately. It is a fail-fast guard ensuring callers pass a valid table identifier.
Source
Thrown at packages/server/src/api/controllers/row/ExternalRequest.ts:289
rowId: string,
table: Table,
colName: string
) {
const tableId = table._id!
const filters = this.prepareFilters(rowId, {}, table)
// safety check, if there are no filters on deletion bad things happen
if (Object.keys(filters).length !== 0) {
await makeExternalQuery({
endpoint: getEndpoint(tableId, Operation.UPDATE),
body: { [colName]: null },
filters,
})
}
}
getTable(tableId: string | undefined): Table | undefined {
if (!tableId) {
throw new Error("Table ID is unknown, cannot find table")
}
const { tableName } = breakExternalTableId(tableId)
return this.tables[tableName]
}
async getRow(table: Table, rowId: string): Promise<Row> {
const response = await makeExternalQuery({
endpoint: getEndpoint(table._id!, Operation.READ),
filters: this.prepareFilters(rowId, {}, table),
})
if (Array.isArray(response) && response.length > 0) {
return response[0]
} else {
throw new Error(`Cannot fetch row by ID "${rowId}"`)
}
}
inputProcessing<T extends Row | undefined>(View on GitHub (pinned to a81a902e9a)
Solutions
- Ensure the request/payload includes a valid, non-empty tableId before invoking the row pipeline
- Re-fetch the table via the datasources API and use its current `_id` (the composite datasourceId:tableName value)
- If the table was deleted/renamed, update automations, screens or API calls that hold the old ID
Example fix
// before
await externalRequest.table(undefined as any)
// after
const tableId = table._id // e.g. "datasourceId__tableName"
if (!tableId) throw new Error("Row payload missing table._id")
await externalRequest.table(tableId) Defensive patterns
Strategy: validation
Validate before calling
function assertValidTableId(tableId?: string): asserts tableId is string {
if (!tableId || !tableId.includes("__")) {
throw new Error(`Invalid external table id: ${tableId}`)
}
}
assertValidTableId(payload.tableId) Type guard
const isExternalTableId = (id: unknown): id is string => typeof id === "string" && id.length > 0
Prevention
- Always source tableId from the fetched table's `_id`, never hand-write it
- Re-fetch table metadata after renames/deletes instead of caching IDs
- Validate request payloads for tableId before calling row endpoints
When it happens
Trigger: Calling table(), linkTable(), run(), destroy() or the [table, links] fetch with a row/request whose tableId property is undefined or empty string, e.g. an automation or API request referencing a deleted table or missing `tableId` field.
Common situations: Requests built from stale table IDs after a table was renamed/deleted; client or automation payloads missing tableId; code constructing external requests manually without setting the ID; REST/SQL datasource rows referencing the wrong composite ID format.
Related errors
- Cannot fetch row by ID "${rowId}"
- Unable to lookup relationships - undefined column properties
- unable to find related table
- sqs_error
- Invalid Teams app package version
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/282323276c94f546.
Report an issue: GitHub.