windmill-labs/windmill · error

Table '${tableRef}' is not configured in this app

Error message

Table '${tableRef}' is not configured in this app

What it means

In RawAppEditor.svelte, when resolving a datatable reference the editor checks the table against the app's configured datatable whitelist via isDatatableTableWhitelisted. If the referenced table (formatted as datatable.schema.table) is not part of the app's allowed table configuration, it throws "Table '<ref>' is not configured in this app". This prevents raw apps from reading tables that were not explicitly enabled.

Source

Thrown at frontend/src/lib/components/raw_apps/RawAppEditor.svelte:1102

				})
				return filterDatatableTables(tables)
			},
			getDatatableTableSchema: async (
				datatableName: string,
				schemaName: string,
				tableName: string
			): Promise<Record<string, string>> => {
				if (!opWorkspace) {
					return {}
				}

				if (!isDatatableTableWhitelisted(datatableName, schemaName, tableName)) {
					const tableRef = formatDataTableRef({
						datatable: datatableName,
						schema: schemaName === 'public' ? undefined : schemaName,
						table: tableName
					})
					throw new Error(`Table '${tableRef}' is not configured in this app`)
				}

				const schema = await WorkspaceService.getDataTableTableSchema({
					workspace: opWorkspace,
					datatableName,
					schemaName,
					tableName
				})
				return schema.columns
			},
			getAvailableDatatableNames: (): string[] => {
				// Get unique datatable names from dataTableRefs
				return [...dataTableWhitelist.datatables]
			},
			execDatatableSql: async (
				datatableName: string,
				sql: string,
				newTable?: { schema: string; name: string }

View on GitHub (pinned to e474e8803c)

Solutions

  1. Open the app's datatable configuration and add the referenced table to the allowed tables list
  2. Verify the exact datatable/schema/table names in the component match the configured ones (schema defaults to 'public')
  3. If the component was copied from another app, re-point it to a table configured in this app
  4. Check git/deployment history if the app's table configuration was recently changed

Example fix

// before (app config omits the table)
// component queries: private.events
// app datatables: [public.orders]
// after (add the table to the app config)
// app datatables: [public.orders, private.events]
Defensive patterns

Strategy: validation

Validate before calling

const ref = { datatable: 'private', schema: 'analytics', table: 'events' }
if (!appPolicy.datatableTables.some(t => t.datatable === ref.datatable && (t.schema ?? 'public') === ref.schema && t.table === ref.table)) {
  console.error('table not configured in this app')
}

Type guard

function isTableConfigured(ref: { datatable: string; schema?: string; table: string }, config: { datatable: string; schema?: string; table: string }[]): boolean {
  return config.some(t => t.datatable === ref.datatable && (t.schema ?? 'public') === (ref.schema ?? 'public') && t.table === ref.table)
}

Try / catch

try {
  await resolveDataTableComponent(ref)
} catch (e) {
  if (e.message.includes('is not configured in this app')) {
    sendUserToast('Add ' + extractTableRef(e.message) + " to the app's datatable configuration", true)
  }
}

Prevention

When it happens

Trigger: Opening/previewing a raw app component that references a datatable table (directly or via a query/component) that is not present in the app's datatable configuration — e.g. the app policy whitelist changed, the table name/schema was renamed, or the component was copied from another app.

Common situations: Copying a component between apps where the target app doesn't list that table; renaming or moving a table (different schema) after the app was built; the datatable itself was deleted or its configuration removed from app settings; typo in table name so the whitelist lookup misses.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/2a85aa03ab2a37e2. Report an issue: GitHub.