Intelligence · GenAI on curated products
Genie-style governed text-to-SQL
The model proposes SQL; Atlas validates it against an allowlist and runs it through an RLS-scoped, SELECT-only executor. Every answer respects the same entitlements as the rest of the platform - the same pattern as Databricks AI/BI Genie or Snowflake Cortex Analyst.
The generated SQL runs through run_select under this role's RLS - so NL-to-SQL is entitlement-scoped too.
- · anon SELECT-only on schema atlas
- · single statement; SELECT / WITH only
- · DDL/DML + cross-schema rejected
- · 4s statement timeout · hard LIMIT 200
- · RLS still applies to generated SQL
Every guard above is inspectable in this repo: src/lib/atlas/sql/0003_atlas_rpcs.sql (run_select) and 0001 (the SELECT-only anon grant that backstops the text guards).