Controls whether the AI can generate CTEs (common table expressions) in its queries, based on user permission levels.
Controls whether the Omni Agent and Workbook Agent can generate CTEs (common table expressions) in their queries.This setting only applies to AI-generated queries. Hand-written SQL is not affected by this setting.
Disabling CTEs is not recommended. Omni’s AI evals are not run in this mode, and CTEs are still governed by your model - they build on top of it, not around it. Turning off CTEs limits what the AI can generate, and Omni will not address reports of the AI failing to produce certain queries as a result.
Syntax
ai_settings: allow_ctes: <always | never | not_for_restricted_queriers>
Properties
object
An object that contains various AI settings. See ai_settings for more information.
Hide ai_settings properties
string
default:"always"
When the Omni Agent and Workbook Agent can generate CTEs in their queries. Does not apply to hand-written SQL.Must be one of the following:
always - Default. The AI can generate CTEs for all users, regardless of whether their role allows direct SQL access.
never - The AI cannot generate CTEs.
not_for_restricted_queriers - The AI can generate CTEs for all users with querying access except Restricted Queriers.