If Dreamlit can’t read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here’s how to add one.
Created a new Supabase table but Dreamlit can’t read it? The most common cause:
Row Level Security (RLS) is enabled on the table but there’s no policy granting
dreamlit_app read access yet.
You connected Supabase to Dreamlit using Dreamlit’s Supabase Connect OAuth flow
Dreamlit created the dreamlit_app user for you
If you self-host Supabase or connected it as a generic Postgres database, your
steps may differ.
This only applies to tables that use RLS, and it’s expected. PostgreSQL doesn’t
support default RLS policies for future tables, so each new RLS-enabled table
needs its own policy.
In Supabase, go to Authentication → Configuration → Policies.If your dashboard uses a slightly different layout, look for
Authentication → Policies.
2
Select the table and create a policy
Find your new table in the Policies page.Create a new policy from scratch.
3
Fill the policy to match Dreamlit's setup
Use these values:
Field
Value
Policy name
dreamlit_dreamlit_app_select_policy
Command / action
SELECT
Target role
dreamlit_app
USING expression
true
This mirrors the same policy Dreamlit applies during provisioning. It’s
read-only and doesn’t allow inserts, updates, or deletes.If RLS isn’t enabled yet for that table, turn it on first before saving
the policy.
Add the Dreamlit read-only policy in the Supabase policy editor
4
Save and retry in Dreamlit
Go back to Dreamlit and retry the action that was failing:
Reopen the workflow or table picker
Republish the workflow if needed
Retry the preview or trigger setup
If the connection is paused, go to Settings → Database Connections and
click Resume connection.
Dreamlit adds a permissive SELECT policy for dreamlit_app when it provisions
your Supabase connection, but that only covers tables that exist at that
moment. New tables need the same policy added manually.Supabase encourages RLS, and tables created through the dashboard often start
with RLS enabled by default. How a table is created affects whether RLS is on:
Tables created in the Supabase dashboard usually have RLS enabled by default
Tables created via SQL or migrations need RLS enabled manually
Add explicit RLS policies that give dreamlit_app the access it needs, or ask
your AI to make that change for you.If you keep RLS on Dreamlit’s internal tables, make sure dreamlit_app has
these permissions:
SELECT, INSERT, UPDATE, and DELETE on dreamlit.event_log
SELECT, INSERT, UPDATE, and DELETE on dreamlit.error_log
SELECT, INSERT, UPDATE, and DELETE on dreamlit.version
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Dreamlit AI","colors":{"primary":"#211F26","light":"#FFFFFF","dark":"#211F26"},"logo":{"light":"https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/logo/logo.svg?fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=6a42bf3e0ba53bffd9f71388b245160d","dark":"https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/logo/logowhite.svg?fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=4ad6a9428edeca551e0861c8feeb4d5c"},"favicon":"https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/favicon.svg?fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=900c3dce9e6121983352a882067426f0","navbar":{"links":[{"href":"mailto:support@dreamlit.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.dreamlit.ai"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/dreamlit-ai"}},"seo":{"indexing":"all"},"integrations":{"ga4":{"measurementId":"G-HEMM1933Q9"},"posthog":{"apiKey":"phc_1AsHWVve9XKNlHmx3SMiEwnIy0fxwNbRYnR8lEHoEaz"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity",{"title":"llms.txt","description":"Short LLM-readable index for Dreamlit docs and product pages.","href":"/llms.txt"},{"title":"llms-full.txt","description":"Full LLM-readable canonical URL inventory.","href":"/llms-full.txt"}],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"notikaai","hasAudioNarration":false,"actualSubdomain":"notikaai","customDomains":["dreamlit.ai"],"gitSource":{"type":"github","owner":"dreamlit-ai","repo":"webapp","deployBranch":"prod","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":true,"edits":true},"entitlements":{},"buildId":"6af21f1772ceb183dca289bf","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"Dreamlit Engine (Legacy)","count":59},{"language":"default","tag":"MCP","count":15},{"language":"default","tag":"Quick Start","count":14},{"language":"default","tag":"Learning Center","count":11},{"language":"default","tag":"Configuration","count":8},{"language":"default","tag":"Dreamlit","count":8},{"language":"default","tag":"Resources","count":8},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Step types","count":7},{"language":"default","tag":"Get Started","count":5}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"troubleshooting/fix-supabase-rls-access","slug":"/troubleshooting/fix-supabase-rls-access","pageMetadata":{"title":"Fix Supabase RLS Access for Dreamlit","sidebarTitle":"Supabase RLS","description":"If Dreamlit can't read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here's how to add one.","href":"/troubleshooting/fix-supabase-rls-access"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"If Dreamlit can’t read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here’s how to add one.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const SupabaseRlsSqlBuilder=()=>{const[schema,setSchema]=useState(`public`);const[table,setTable]=useState(`your_table`);const[copyLabel,setCopyLabel]=useState(`Copy SQL`);const inputStyle={padding:`6px 8px`,border:`1px solid #d1d5db`,borderRadius:6,fontSize:13,width:`100%`,boxSizing:`border-box`};const labelStyle={fontSize:12,fontWeight:600,color:`#374151`,marginBottom:4};const quoteIdent=value=>`\"${value.replace(/\"/g,`\"\"`)}\"`;const sql=useMemo(()=>{const schemaName=schema.trim()||`public`;const tableName=table.trim()||`your_table`;const policyName=`dreamlit_dreamlit_app_select_policy`;const targetRole=`dreamlit_app`;const tableRef=`${quoteIdent(schemaName)}.${quoteIdent(tableName)}`;const statements=[`DROP POLICY IF EXISTS ${quoteIdent(policyName)} ON ${tableRef};`,`CREATE POLICY ${quoteIdent(policyName)}\nON ${tableRef}\nFOR SELECT\nTO ${quoteIdent(targetRole)}\nUSING (true);`];return statements.join(`\n\n`)},[schema,table]);const handleCopy=async()=>{try{await navigator.clipboard.writeText(sql);setCopyLabel(`Copied!`);setTimeout(()=>setCopyLabel(`Copy SQL`),1800)}catch{setCopyLabel(`Copy failed`);setTimeout(()=>setCopyLabel(`Copy SQL`),1800)}};return _jsxs(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:14,background:`#fafafa`,margin:`16px 0`},children:[_jsx(`div`,{style:{fontSize:13,color:`#4b5563`,marginBottom:12,lineHeight:1.5},children:`This SQL uses the same read-only policy shape Dreamlit provisions.`}),_jsxs(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:10,marginBottom:10},children:[_jsxs(`div`,{children:[_jsx(`div`,{style:labelStyle,children:`Schema`}),_jsx(`input`,{value:schema,onChange:e=>setSchema(e.target.value),placeholder:`public`,style:inputStyle})]}),_jsxs(`div`,{children:[_jsx(`div`,{style:labelStyle,children:`Table`}),_jsx(`input`,{value:table,onChange:e=>setTable(e.target.value),placeholder:`your_table`,style:inputStyle})]})]}),_jsxs(`div`,{style:{marginBottom:10},children:[_jsx(`div`,{style:{...labelStyle,marginBottom:6},children:`SQL`}),_jsx(`pre`,{style:{border:`1px solid #d1d5db`,borderRadius:8,background:`#111827`,color:`#e5e7eb`,padding:12,fontSize:12,lineHeight:1.5,overflowX:`auto`,whiteSpace:`pre-wrap`},children:sql})]}),_jsx(`button`,{onClick:handleCopy,style:{background:`#111827`,color:`white`,border:`none`,borderRadius:6,padding:`8px 12px`,fontSize:13,cursor:`pointer`},children:copyLabel})]})};const DreamlitSchemaRlsFixBuilder=({mode=`disable`})=>{const[copyLabel,setCopyLabel]=useState(`Copy SQL`);const labelStyle={fontSize:12,fontWeight:600,color:`#374151`,marginBottom:6};const isPolicyMode=mode===`policies`;const sql=useMemo(()=>{if(isPolicyMode){return`DROP POLICY IF EXISTS \"dreamlit_dreamlit_app_all_policy\" ON dreamlit.event_log;\nCREATE POLICY \"dreamlit_dreamlit_app_all_policy\"\nON dreamlit.event_log\nFOR ALL\nTO dreamlit_app\nUSING (true)\nWITH CHECK (true);\n\nDROP POLICY IF EXISTS \"dreamlit_dreamlit_app_all_policy\" ON dreamlit.error_log;\nCREATE POLICY \"dreamlit_dreamlit_app_all_policy\"\nON dreamlit.error_log\nFOR ALL\nTO dreamlit_app\nUSING (true)\nWITH CHECK (true);\n\nDROP POLICY IF EXISTS \"dreamlit_dreamlit_app_all_policy\" ON dreamlit.version;\nCREATE POLICY \"dreamlit_dreamlit_app_all_policy\"\nON dreamlit.version\nFOR ALL\nTO dreamlit_app\nUSING (true)\nWITH CHECK (true);`}return`ALTER TABLE dreamlit.event_log DISABLE ROW LEVEL SECURITY;\nALTER TABLE dreamlit.error_log DISABLE ROW LEVEL SECURITY;\nALTER TABLE dreamlit.version DISABLE ROW LEVEL SECURITY;`},[isPolicyMode]);const handleCopy=async()=>{try{await navigator.clipboard.writeText(sql);setCopyLabel(`Copied!`);setTimeout(()=>setCopyLabel(`Copy SQL`),1800)}catch{setCopyLabel(`Copy failed`);setTimeout(()=>setCopyLabel(`Copy SQL`),1800)}};return _jsxs(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:14,background:`#fafafa`,margin:`16px 0`},children:[_jsx(`div`,{style:{fontSize:13,color:`#4b5563`,marginBottom:12,lineHeight:1.5},children:isPolicyMode?`This SQL adds full-access dreamlit_app policies across Dreamlit's internal tables.`:`This SQL disables RLS on Dreamlit's internal tables.`}),_jsxs(`div`,{style:{marginBottom:10},children:[_jsx(`div`,{style:{...labelStyle,marginBottom:6},children:`SQL`}),_jsx(`pre`,{style:{border:`1px solid #d1d5db`,borderRadius:8,background:`#111827`,color:`#e5e7eb`,padding:12,fontSize:12,lineHeight:1.5,overflowX:`auto`,whiteSpace:`pre-wrap`},children:sql})]}),_jsx(`button`,{onClick:handleCopy,style:{background:`#111827`,color:`white`,border:`none`,borderRadius:6,padding:`8px 12px`,fontSize:13,cursor:`pointer`},children:copyLabel})]})};const CopyPromptCard=({title=`Copy Prompt`,description,prompt,buttonLabel=`Copy Prompt`})=>{const[copyLabel,setCopyLabel]=useState(buttonLabel);const handleCopy=async()=>{try{await navigator.clipboard.writeText(prompt||``);setCopyLabel(`Copied!`);setTimeout(()=>setCopyLabel(buttonLabel),1800)}catch{setCopyLabel(`Copy failed`);setTimeout(()=>setCopyLabel(buttonLabel),1800)}};return _jsxs(`div`,{style:{border:`1px solid #e5e7eb`,borderRadius:10,padding:14,background:`#fafafa`,margin:`16px 0`},children:[_jsx(`div`,{style:{fontSize:14,fontWeight:600,color:`#111827`,marginBottom:description?6:10},children:title}),description?_jsx(`div`,{style:{fontSize:13,color:`#4b5563`,lineHeight:1.5,marginBottom:10},children:description}):null,_jsx(`pre`,{style:{border:`1px solid #d1d5db`,borderRadius:8,background:`#111827`,color:`#e5e7eb`,padding:12,fontSize:12,lineHeight:1.5,overflowX:`auto`,whiteSpace:`pre-wrap`,marginBottom:10},children:prompt}),_jsx(`button`,{onClick:handleCopy,style:{background:`#111827`,color:`white`,border:`none`,borderRadius:6,padding:`8px 12px`,fontSize:13,cursor:`pointer`},children:copyLabel})]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Frame,Heading,Info,OptimizedImage,Step,Steps,Table,_MdxComponentBoundary}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Created a new Supabase table but Dreamlit can’t read it? The most common cause:\nRow Level Security (RLS) is enabled on the table but there’s no policy granting\n`,_jsx(_components.code,{children:`dreamlit_app`}),` read access yet.`]}),`\n`,_jsx(Heading,{level:`2`,id:`this-guide-assumes`,children:`This guide assumes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You use Supabase Cloud`}),`\n`,_jsx(_components.li,{children:`You connected Supabase to Dreamlit using Dreamlit’s Supabase Connect OAuth flow`}),`\n`,_jsxs(_components.li,{children:[`Dreamlit created the `,_jsx(_components.code,{children:`dreamlit_app`}),` user for you`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`If you self-host Supabase or connected it as a generic Postgres database, your\nsteps may differ.`}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`This only applies to tables that use RLS, and it’s expected. PostgreSQL doesn’t\nsupport default RLS policies for future tables, so each new RLS-enabled table\nneeds its own policy.`})}),`\n`,_jsx(Heading,{level:`2`,id:`how-do-i-know-if-rls-is-blocking-dreamlit`,children:`How do I know if RLS is blocking Dreamlit?`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You created a new table after connecting Supabase to Dreamlit`}),`\n`,_jsx(_components.li,{children:`The table has data in it, but Dreamlit can’t preview any rows`}),`\n`,_jsx(_components.li,{children:`You try to publish or configure something in Dreamlit and hit a database access error`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Pick the approach that fits your workflow:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`#use-the-supabase-ui`,children:`Use the Supabase UI`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`#ask-your-ai`,children:`Ask your AI`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`#use-sql`,children:`Use SQL`})}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-the-supabase-ui`,children:`Use the Supabase UI`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Open the Policies page in Supabase`,children:[_jsxs(_components.p,{children:[`In Supabase, go to `,_jsx(_components.strong,{children:`Authentication → Configuration → Policies`}),`.`]}),_jsxs(_components.p,{children:[`If your dashboard uses a slightly different layout, look for\n`,_jsx(_components.strong,{children:`Authentication → Policies`}),`.`]})]}),_jsxs(Step,{title:`Select the table and create a policy`,children:[_jsx(_components.p,{children:`Find your new table in the Policies page.`}),_jsx(_components.p,{children:`Create a new policy from scratch.`})]}),_jsxs(Step,{title:`Fill the policy to match Dreamlit's setup`,children:[_jsx(_components.p,{children:`Use these values:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Policy name`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`dreamlit_dreamlit_app_select_policy`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Command / action`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SELECT`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Target role`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`dreamlit_app`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`USING expression`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})})]})]})]}),_jsx(_components.p,{children:`This mirrors the same policy Dreamlit applies during provisioning. It’s\nread-only and doesn’t allow inserts, updates, or deletes.`}),_jsx(_components.p,{children:`If RLS isn’t enabled yet for that table, turn it on first before saving\nthe policy.`}),_jsx(Frame,{caption:`Add the Dreamlit read-only policy in the Supabase policy editor`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/images/supabase-rls.png?fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=28c5d63ad09cfc5dbdfd45b80aa64287`,alt:`Supabase policy editor configured with a SELECT policy for dreamlit_app`,\"data-og-width\":`1086`,width:`1086`,\"data-og-height\":`1272`,height:`1272`,\"data-path\":`images/supabase-rls.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/images/supabase-rls.png?w=280\u0026fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=cef68ee5cf2f99beb053b455f8d133b7 280w, https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/images/supabase-rls.png?w=560\u0026fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=d526f4aa9c40059a6476bcc8162410cd 560w, https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/images/supabase-rls.png?w=840\u0026fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=a83384cd9003560cc2529f67165f888c 840w, https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/images/supabase-rls.png?w=1100\u0026fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=54f2cf6c50bf728978c8bc58e82e1879 1100w, https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/images/supabase-rls.png?w=1650\u0026fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=1c0696d74388104e4b9fa2b0abafcead 1650w, https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/images/supabase-rls.png?w=2500\u0026fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=c09d64c47125829577166efc0efe07e0 2500w`})})]}),_jsxs(Step,{title:`Save and retry in Dreamlit`,children:[_jsx(_components.p,{children:`Go back to Dreamlit and retry the action that was failing:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Reopen the workflow or table picker`}),`\n`,_jsx(_components.li,{children:`Republish the workflow if needed`}),`\n`,_jsx(_components.li,{children:`Retry the preview or trigger setup`}),`\n`]}),_jsxs(_components.p,{children:[`If the connection is paused, go to `,_jsx(_components.strong,{children:`Settings → Database Connections`}),` and\nclick `,_jsx(_components.strong,{children:`Resume connection`}),`.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`ask-your-ai`,children:`Ask your AI`}),`\n`,_jsxs(_components.p,{children:[`If you use Lovable, Cursor, v0, Bolt, Replit, or another AI assistant, ask it\nto add the same `,_jsx(_components.code,{children:`SELECT`}),` policy for `,_jsx(_components.code,{children:`dreamlit_app`}),`.`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`CopyPromptCard`,children:_jsx(CopyPromptCard,{description:`Use this when you want your AI to update Supabase or your migrations for you.`,prompt:`I connected Dreamlit to Supabase.\n\nPlease check the tables Dreamlit needs to read and ensure dreamlit_app has SELECT access.\n\nIf a table uses RLS, add or update a read-only policy for dreamlit_app:\n- policy name: dreamlit_dreamlit_app_select_policy\n- action: SELECT\n- using expression: true\n\nDo not add write access and do not use BYPASSRLS.`})}),`\n`,_jsx(Heading,{level:`2`,id:`use-sql`,children:`Use SQL`}),`\n`,_jsx(_components.p,{children:`If you’d rather paste SQL into Supabase SQL Editor, use this builder.`}),`\n`,_jsx(_MdxComponentBoundary,{name:`SupabaseRlsSqlBuilder`,children:_jsx(SupabaseRlsSqlBuilder,{})}),`\n`,_jsx(Heading,{level:`2`,id:`check-it-worked`,children:`Check it worked`}),`\n`,_jsxs(_components.p,{children:[`In Supabase, open the table’s `,_jsx(_components.strong,{children:`Policies`}),` view and confirm you can see a\npolicy with:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`name `,_jsx(_components.code,{children:`dreamlit_dreamlit_app_select_policy`})]}),`\n`,_jsxs(_components.li,{children:[`command `,_jsx(_components.code,{children:`SELECT`})]}),`\n`,_jsxs(_components.li,{children:[`target role `,_jsx(_components.code,{children:`dreamlit_app`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Then go back to Dreamlit and retry the action.`}),`\n`,_jsx(Heading,{level:`2`,id:`why-can’t-dreamlit-read-new-supabase-tables`,children:`Why can’t Dreamlit read new Supabase tables?`}),`\n`,_jsxs(_components.p,{children:[`Dreamlit adds a permissive `,_jsx(_components.code,{children:`SELECT`}),` policy for `,_jsx(_components.code,{children:`dreamlit_app`}),` when it provisions\nyour Supabase connection, but that only covers tables that exist at that\nmoment. New tables need the same policy added manually.`]}),`\n`,_jsx(_components.p,{children:`Supabase encourages RLS, and tables created through the dashboard often start\nwith RLS enabled by default. How a table is created affects whether RLS is on:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Tables created in the Supabase dashboard usually have RLS enabled by default`}),`\n`,_jsx(_components.li,{children:`Tables created via SQL or migrations need RLS enabled manually`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`For more background, see Supabase’s `,_jsx(_components.a,{href:`https://supabase.com/docs/guides/database/postgres/row-level-security`,children:`Row Level Security guide`}),` and `,_jsx(_components.a,{href:`https://supabase.com/docs/guides/api/hardening-data-api`,children:`Hardening the Data API`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-if-the-table-is-still-not-visible`,children:`What if the table is still not visible?`}),`\n`,_jsx(_components.p,{children:`If Dreamlit still can’t read the table after adding the policy:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check the table name`}),`: make sure you used the correct schema and table name`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verify RLS is on`}),`: make sure RLS is enabled on the table you added the policy to`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Test without RLS`}),`: temporarily disable RLS on that table to see if Dreamlit starts working`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check for schema errors`}),`: if the error mentions `,_jsx(_components.code,{children:`dreamlit.event_log`}),` or the `,_jsx(_components.code,{children:`dreamlit`}),` schema, see `,_jsx(_components.a,{href:`#what-if-the-error-mentions-the-dreamlit-schema`,children:`What if the error mentions the dreamlit schema?`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:`If Dreamlit works once RLS is disabled, the issue is with the table’s\nRLS configuration rather than the Dreamlit connection itself.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-if-the-error-mentions-the-dreamlit-schema`,children:`What if the error mentions the dreamlit schema?`}),`\n`,_jsx(_components.p,{children:`Sometimes the issue isn’t your application table. RLS was turned on for\nDreamlit’s own internal tables:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`dreamlit.event_log`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`dreamlit.error_log`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`dreamlit.version`})}),`\n`]}),`\n`,_jsx(_components.p,{children:`Dreamlit needs full access to those internal tables to run correctly.`}),`\n`,_jsx(Heading,{level:`3`,id:`signs-this-is-the-issue`,children:`Signs this is the issue`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Dreamlit can connect, but publish, resume, or verification fails`}),`\n`,_jsxs(_components.li,{children:[`The error mentions `,_jsx(_components.code,{children:`dreamlit.event_log`}),` or the `,_jsx(_components.code,{children:`dreamlit`}),` schema`]}),`\n`,_jsx(_components.li,{children:`Disabling RLS on your application table didn’t help`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`disable-rls-on-dreamlit’s-internal-tables`,children:`Disable RLS on Dreamlit’s internal tables`}),`\n`,_jsx(_components.p,{children:`Disable RLS on Dreamlit’s internal tables:`}),`\n`,_jsx(_MdxComponentBoundary,{name:`DreamlitSchemaRlsFixBuilder`,children:_jsx(DreamlitSchemaRlsFixBuilder,{mode:`disable`})}),`\n`,_jsx(_components.p,{children:`After that, retry the action in Dreamlit.`}),`\n`,_jsx(Heading,{level:`3`,id:`if-you-need-to-keep-rls-on-those-tables`,children:`If you need to keep RLS on those tables`}),`\n`,_jsxs(_components.p,{children:[`Add explicit RLS policies that give `,_jsx(_components.code,{children:`dreamlit_app`}),` the access it needs, or ask\nyour AI to make that change for you.`]}),`\n`,_jsxs(_components.p,{children:[`If you keep RLS on Dreamlit’s internal tables, make sure `,_jsx(_components.code,{children:`dreamlit_app`}),` has\nthese permissions:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`SELECT`}),`, `,_jsx(_components.code,{children:`INSERT`}),`, `,_jsx(_components.code,{children:`UPDATE`}),`, and `,_jsx(_components.code,{children:`DELETE`}),` on `,_jsx(_components.code,{children:`dreamlit.event_log`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`SELECT`}),`, `,_jsx(_components.code,{children:`INSERT`}),`, `,_jsx(_components.code,{children:`UPDATE`}),`, and `,_jsx(_components.code,{children:`DELETE`}),` on `,_jsx(_components.code,{children:`dreamlit.error_log`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`SELECT`}),`, `,_jsx(_components.code,{children:`INSERT`}),`, `,_jsx(_components.code,{children:`UPDATE`}),`, and `,_jsx(_components.code,{children:`DELETE`}),` on `,_jsx(_components.code,{children:`dreamlit.version`})]}),`\n`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`CopyPromptCard`,children:_jsx(CopyPromptCard,{title:`Copy Prompt`,description:`Use this when your AI manages your Supabase schema or migrations.`,prompt:`I connected Dreamlit to Supabase using Dreamlit's Supabase Connect flow.\n\nPlease check the dreamlit schema tables:\n- dreamlit.event_log\n- dreamlit.error_log\n- dreamlit.version\n\nIf RLS is enabled on those tables, add explicit policies so dreamlit_app can\nSELECT, INSERT, UPDATE, and DELETE on all three tables.\n\nDo not change my application tables unless needed for this fix.`})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DreamlitSchemaRlsFixBuilder`,children:_jsx(DreamlitSchemaRlsFixBuilder,{mode:`policies`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{SupabaseRlsSqlBuilder,DreamlitSchemaRlsFixBuilder,CopyPromptCard,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Fix Supabase RLS Access for Dreamlit","sidebarTitle":"Supabase RLS","description":"If Dreamlit can't read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here's how to add one.","href":"/troubleshooting/fix-supabase-rls-access"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[160,5820,"null;const DreamlitSchemaRlsFixBuilder=()=>null;const CopyPromptCard=()=>null;fu"]]},"mdxExtracts":{"tableOfContents":[{"title":"This guide assumes","slug":"this-guide-assumes","depth":2,"children":[]},{"title":"How do I know if RLS is blocking Dreamlit?","slug":"how-do-i-know-if-rls-is-blocking-dreamlit","depth":2,"children":[]},{"title":"Use the Supabase UI","slug":"use-the-supabase-ui","depth":2,"children":[]},{"title":"Ask your AI","slug":"ask-your-ai","depth":2,"children":[]},{"title":"Use SQL","slug":"use-sql","depth":2,"children":[]},{"title":"Check it worked","slug":"check-it-worked","depth":2,"children":[]},{"title":"Why can’t Dreamlit read new Supabase tables?","slug":"why-can’t-dreamlit-read-new-supabase-tables","depth":2,"children":[]},{"title":"What if the table is still not visible?","slug":"what-if-the-table-is-still-not-visible","depth":2,"children":[]},{"title":"What if the error mentions the dreamlit schema?","slug":"what-if-the-error-mentions-the-dreamlit-schema","depth":2,"children":[{"title":"Signs this is the issue","slug":"signs-this-is-the-issue","depth":3,"children":[]},{"title":"Disable RLS on Dreamlit’s internal tables","slug":"disable-rls-on-dreamlit’s-internal-tables","depth":3,"children":[]},{"title":"If you need to keep RLS on those tables","slug":"if-you-need-to-keep-rls-on-those-tables","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"notikaai","siteName":"Dreamlit AI","title":"Fix Supabase RLS Access for Dreamlit - Dreamlit AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-17T07:06:50.092Z","originalFileLocation":"troubleshooting/fix-supabase-rls-access.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"If Dreamlit can\u0026#x27;t read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here\u0026#x27;s how to add one.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dreamlit AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Fix Supabase RLS Access for Dreamlit - Dreamlit AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"If Dreamlit can\u0026#x27;t read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here\u0026#x27;s how to add one.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dreamlit AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://notikaai.mintlify.site/docs/_mintlify/api/og/v2?division=Troubleshooting\u0026amp;title=Fix+Supabase+RLS+Access+for+Dreamlit\u0026amp;description=If+Dreamlit+can%27t+read+a+new+Supabase+table%2C+it+probably+needs+a+SELECT+RLS+policy+for+dreamlit_app.+Here%27s+how+to+add+one.\u0026amp;theme=cd9765a2269f5674b365d03b\u0026amp;signature=f2afc875d42e306bcc499f74cdbeabf081df1814ae865ba8e56842f613611b15\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Fix Supabase RLS Access for Dreamlit - Dreamlit AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"If Dreamlit can\u0026#x27;t read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here\u0026#x27;s how to add one.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://notikaai.mintlify.site/docs/_mintlify/api/og/v2?division=Troubleshooting\u0026amp;title=Fix+Supabase+RLS+Access+for+Dreamlit\u0026amp;description=If+Dreamlit+can%27t+read+a+new+Supabase+table%2C+it+probably+needs+a+SELECT+RLS+policy+for+dreamlit_app.+Here%27s+how+to+add+one.\u0026amp;theme=cd9765a2269f5674b365d03b\u0026amp;signature=f2afc875d42e306bcc499f74cdbeabf081df1814ae865ba8e56842f613611b15\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/notikaai/HoOX77VHSfRwGtal/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dreamlit AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#211F26\">\u003clink data-mint-head rel=\"canonical\" href=\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/troubleshooting/fix-supabase-rls-access.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://dreamlit.ai/#organization\",\"name\":\"Dreamlit AI\",\"url\":\"https://dreamlit.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/notikaai/5oYlSr6CYnDtP1nH/logo/logo.svg?fit=max\u0026auto=format\u0026n=5oYlSr6CYnDtP1nH\u0026q=85\u0026s=6a42bf3e0ba53bffd9f71388b245160d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://dreamlit.ai/docs#website\",\"name\":\"Dreamlit AI\",\"url\":\"https://dreamlit.ai/docs\",\"publisher\":{\"@id\":\"https://dreamlit.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access#webpage\",\"url\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access\",\"name\":\"Fix Supabase RLS Access for Dreamlit\",\"description\":\"If Dreamlit can't read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here's how to add one.\",\"dateModified\":\"2026-08-17T07:06:50.092Z\",\"isPartOf\":{\"@id\":\"https://dreamlit.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Dreamlit AI\",\"item\":\"https://dreamlit.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fix Supabase RLS Access for Dreamlit\",\"item\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access#article\",\"headline\":\"Fix Supabase RLS Access for Dreamlit\",\"name\":\"Fix Supabase RLS Access for Dreamlit\",\"description\":\"If Dreamlit can't read a new Supabase table, it probably needs a SELECT RLS policy for dreamlit_app. Here's how to add one.\",\"url\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access\",\"mainEntityOfPage\":{\"@id\":\"https://dreamlit.ai/docs/troubleshooting/fix-supabase-rls-access#webpage\"},\"dateModified\":\"2026-08-17T07:06:50.092Z\",\"publisher\":{\"@id\":\"https://dreamlit.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://dreamlit.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dreamlit AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Dreamlit AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/troubleshooting/fix-supabase-rls-access.md","siteName":"Dreamlit AI","nav":{"global":null,"tabs":[{"tab":"Dreamlit","icon":"rocket","pages":[{"title":"Dreamlit","href":"/introduction"}]},{"tab":"Dreamlit Engine (Legacy)","icon":"gears","groups":[{"group":"Get Started","pages":[{"title":"Dreamlit Engine","icon":"book-open","href":"/getting-started/introduction"},{"title":"Use cases","icon":"lightbulb","href":"/getting-started/use-cases"},{"title":"How it works","icon":"gears","href":"/getting-started/how-it-works"},{"title":"FAQ","icon":"circle-question","href":"/getting-started/faq"},{"title":"Quickstart","icon":"rocket","href":"/getting-started/quickstart"}]},{"group":"Dreamlit for...","pages":[{"title":"For vibe coders","href":"/getting-started/for-vibe-coders"},{"title":"For developers","href":"/getting-started/for-developers"},{"title":"For product teams","href":"/getting-started/for-product-teams"}]},{"group":"Guides","pages":[{"title":"How to Set Up Supabase Auth Emails with Dreamlit","sidebarTitle":"Supabase Auth Emails","icon":"bolt","href":"/guides/supabase-auth-emails"},{"title":"How to Add Emails to Your Lovable App (The Easy Way)","sidebarTitle":"Lovable Apps","icon":"heart","href":"/guides/lovable-email"},{"title":"Bolt.new Email: Send Notifications Without the Infrastructure","sidebarTitle":"Bolt.new Apps","icon":"bold","href":"/guides/bolt-email"},{"title":"Cursor Email: Send Notifications Without Breaking Your Flow","sidebarTitle":"Cursor Apps","icon":"code","href":"/guides/cursor-email"},{"title":"How to Add Emails to Your Replit App (The Easy Way)","sidebarTitle":"Replit Apps","icon":"laptop-code","href":"/guides/replit-email"},{"title":"v0 Email: Send Notifications by Describing What You Want","sidebarTitle":"v0 Apps","icon":"sparkles","href":"/guides/v0-email"},{"title":"Figma Make Email: Design-to-App Meets AI-Powered Notifications","sidebarTitle":"Figma Make Apps","icon":"figma","href":"/guides/figma-make-email"}]},{"group":"Configuration","pages":[{"group":"Data Sources","pages":[{"title":"Supabase","href":"/configuration/data-sources/supabase"},{"title":"PostgreSQL","href":"/configuration/data-sources/postgres"},{"title":"Shopify","href":"/configuration/data-sources/shopify"}]},{"group":"Email","pages":[{"title":"Overview","href":"/configuration/email/index"},{"title":"Custom domain","sidebarTitle":"Custom domain","href":"/configuration/email/custom-domain"},{"title":"Brand styles","sidebarTitle":"Brand styles","href":"/configuration/email/brand-styles"},{"title":"Managing unsubscribed contacts","href":"/configuration/email/managing-unsubscribed-contacts"}]},{"title":"Slack","href":"/configuration/slack"}]},{"group":"Workflow","pages":[{"title":"Basics","href":"/workflow/basics"},{"title":"Preview","href":"/workflow/test-interface"},{"title":"Publishing workflows","href":"/workflow/publishing-workflows"},{"title":"Inspecting inflight workflows","href":"/workflow/inspecting-inflight-workflows"},{"title":"Broadcast","href":"/workflow/broadcast"}]},{"group":"Step types","pages":[{"title":"Database trigger","href":"/steps/database-trigger"},{"title":"Repeating trigger","href":"/steps/repeating-trigger"},{"title":"Supabase Auth trigger","href":"/steps/supabase-auth-trigger"},{"title":"Wait","href":"/steps/wait"},{"title":"Query","href":"/steps/query"},{"title":"Send email","href":"/steps/send-email"},{"title":"Send Slack","description":"Send a message to a Slack channel.","href":"/steps/send-slack"}]},{"group":"Troubleshooting","pages":[{"title":"Fix Supabase RLS Access for Dreamlit","sidebarTitle":"Supabase RLS","href":"/troubleshooting/fix-supabase-rls-access"}]},{"group":"MCP","pages":[{"title":"MCP server for AI agents","sidebarTitle":"Overview","description":"Use the Model Context Protocol (MCP) to let Claude, Cursor, Codex, and other AI clients manage your workflows in Dreamlit.","href":"/resources/mcp-server"},{"group":"Quick Start","expanded":false,"pages":[{"title":"Dreamlit MCP for Claude Code","sidebarTitle":"Claude Code","href":"/resources/mcp-server/claude-code"},{"title":"Dreamlit MCP for Claude Desktop","sidebarTitle":"Claude Desktop","href":"/resources/mcp-server/claude-desktop"},{"title":"Dreamlit MCP for Codex","sidebarTitle":"Codex","href":"/resources/mcp-server/codex"},{"title":"Dreamlit MCP for Cursor","sidebarTitle":"Cursor","href":"/resources/mcp-server/cursor"},{"title":"Dreamlit MCP for OpenClaw","sidebarTitle":"OpenClaw","href":"/resources/mcp-server/openclaw"},{"title":"Dreamlit MCP for Hermes Agent","sidebarTitle":"Hermes","href":"/resources/mcp-server/hermes"},{"title":"Dreamlit MCP for Gemini CLI","sidebarTitle":"Gemini CLI","href":"/resources/mcp-server/gemini-cli"},{"title":"Dreamlit MCP for VS Code","sidebarTitle":"VS Code","href":"/resources/mcp-server/vs-code"},{"title":"Dreamlit MCP for Windsurf","sidebarTitle":"Windsurf","href":"/resources/mcp-server/windsurf"},{"title":"Dreamlit MCP for Zed","sidebarTitle":"Zed","href":"/resources/mcp-server/zed"},{"title":"Dreamlit MCP for Lovable","sidebarTitle":"Lovable","href":"/resources/mcp-server/lovable"},{"title":"Dreamlit MCP for Bolt","sidebarTitle":"Bolt","href":"/resources/mcp-server/bolt"},{"title":"Dreamlit MCP for Replit","sidebarTitle":"Replit","href":"/resources/mcp-server/replit"},{"title":"Dreamlit MCP for v0","sidebarTitle":"v0","href":"/resources/mcp-server/v0"}]}]},{"group":"Resources","pages":[{"title":"Deliverability","href":"/resources/deliverability"},{"title":"Security","href":"/resources/security"},{"title":"Contact us","href":"/resources/getting-support"},{"title":"Media resources","href":"/resources/media"},{"title":"Pricing","href":"/resources/pricing"},{"title":"System status","url":"https://status.dreamlit.ai","href":"/resources/system-status"},{"title":"Privacy policy","url":"https://dreamlit.ai/privacy-policy","href":"/resources/privacy-policy"},{"title":"Terms of service","url":"https://www.dreamlit.ai/terms-of-service","href":"/resources/terms-of-service"}]}]},{"tab":"Learning Center","icon":"graduation-cap","pages":[{"title":"Learning Center","href":"/learn/overview"}]}]},"basePath":"","title":"Fix Supabase RLS Access for Dreamlit - Dreamlit AI","buildId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","deploymentId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-Buk2KjK6.js","DynamicMarkdown-DYYZTGpa.js","zoom-image-lightbox-T84NdC3b.js","lightbox-handle-r17bVUz3.js"]}