{"record":{"id":"2a85aa03ab2a37e2","repo":"windmill-labs/windmill","slug":"table-tableref-is-not-configured-in-this-app","errorCode":null,"errorMessage":"Table '${tableRef}' is not configured in this app","messagePattern":"Table '(.+?)' is not configured in this app","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/raw_apps/RawAppEditor.svelte","lineNumber":1102,"sourceCode":"\t\t\t\t})\n\t\t\t\treturn filterDatatableTables(tables)\n\t\t\t},\n\t\t\tgetDatatableTableSchema: async (\n\t\t\t\tdatatableName: string,\n\t\t\t\tschemaName: string,\n\t\t\t\ttableName: string\n\t\t\t): Promise<Record<string, string>> => {\n\t\t\t\tif (!opWorkspace) {\n\t\t\t\t\treturn {}\n\t\t\t\t}\n\n\t\t\t\tif (!isDatatableTableWhitelisted(datatableName, schemaName, tableName)) {\n\t\t\t\t\tconst tableRef = formatDataTableRef({\n\t\t\t\t\t\tdatatable: datatableName,\n\t\t\t\t\t\tschema: schemaName === 'public' ? undefined : schemaName,\n\t\t\t\t\t\ttable: tableName\n\t\t\t\t\t})\n\t\t\t\t\tthrow new Error(`Table '${tableRef}' is not configured in this app`)\n\t\t\t\t}\n\n\t\t\t\tconst schema = await WorkspaceService.getDataTableTableSchema({\n\t\t\t\t\tworkspace: opWorkspace,\n\t\t\t\t\tdatatableName,\n\t\t\t\t\tschemaName,\n\t\t\t\t\ttableName\n\t\t\t\t})\n\t\t\t\treturn schema.columns\n\t\t\t},\n\t\t\tgetAvailableDatatableNames: (): string[] => {\n\t\t\t\t// Get unique datatable names from dataTableRefs\n\t\t\t\treturn [...dataTableWhitelist.datatables]\n\t\t\t},\n\t\t\texecDatatableSql: async (\n\t\t\t\tdatatableName: string,\n\t\t\t\tsql: string,\n\t\t\t\tnewTable?: { schema: string; name: string }","sourceCodeStart":1084,"sourceCodeEnd":1120,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/raw_apps/RawAppEditor.svelte#L1084-L1120","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the app's datatable configuration and add the referenced table to the allowed tables list","Verify the exact datatable/schema/table names in the component match the configured ones (schema defaults to 'public')","If the component was copied from another app, re-point it to a table configured in this app","Check git/deployment history if the app's table configuration was recently changed"],"exampleFix":"// before (app config omits the table)\n// component queries: private.events\n// app datatables: [public.orders]\n// after (add the table to the app config)\n// app datatables: [public.orders, private.events]","handlingStrategy":"validation","validationCode":"const ref = { datatable: 'private', schema: 'analytics', table: 'events' }\nif (!appPolicy.datatableTables.some(t => t.datatable === ref.datatable && (t.schema ?? 'public') === ref.schema && t.table === ref.table)) {\n  console.error('table not configured in this app')\n}","typeGuard":"function isTableConfigured(ref: { datatable: string; schema?: string; table: string }, config: { datatable: string; schema?: string; table: string }[]): boolean {\n  return config.some(t => t.datatable === ref.datatable && (t.schema ?? 'public') === (ref.schema ?? 'public') && t.table === ref.table)\n}","tryCatchPattern":"try {\n  await resolveDataTableComponent(ref)\n} catch (e) {\n  if (e.message.includes('is not configured in this app')) {\n    sendUserToast('Add ' + extractTableRef(e.message) + \" to the app's datatable configuration\", true)\n  }\n}","preventionTips":["Add every table a component uses to the app's datatable configuration before deploying","Re-check table configuration after copying components between apps","Avoid renaming/moving tables without updating the app config","Use fully qualified refs (datatable.schema.table) in components to avoid schema mismatches"],"tags":["configuration","datatable","raw-apps"],"backgroundTag":"resource-not-configured","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}