DeploymentConfig
Configure how a model is deployed: schema, schedules, and outputs.
This is the single section describing deployment behavior. It carries the
deploy-specific scalars (schema, auto_deploy), the
named refresh schedules, and the outputs configuration (default reasoner /
materialization / schedule plus per-output overrides).
Examples
deployment: schema: analytics auto_deploy: true schedules: standard: interval_s: 60 fast_path: interval_s: 10 outputs: type: table schedule: standard overrides: - objects: [recursive_closure] reasoner: logic schedule: fast_pathAttributes
.schema_
DeploymentConfig.schema_: (str, optional)Install schema for model-generated SQL views and tables (config key is
schema).
.role
DeploymentConfig.role: (str, optional)Snowflake role to use when deploying the model.
.tags
DeploymentConfig.tags: dict[str, str]Existing Snowflake tags applied to every RAI-created object, public and
internal, excluding schemas. Keys are fully qualified tag names
(database.schema.tag); values are the strings assigned. The tags must
already exist and the deploy role must hold APPLY on them — RAI never
creates a tag or widens its allowed values. Each tag rides the CREATE of the
object it belongs to, so editing this map changes every object’s DDL: expect a
full redeploy after any edit, and note that a tag attached out of band does not
survive its object being replaced. RAI never removes a tag — dropping an entry
is not how you unset one; do that by hand or tear the model down. RAI’s own
ownership tag cannot be named here; use managed_tag instead.
.managed_tag
DeploymentConfig.managed_tag: (str, optional)Fully qualified name (database.schema.tag) of an existing Snowflake tag for
RAI to mark the objects it owns with, instead of creating
<meta_schema>.relationalai_managed itself. Naming one says the customer owns
the definition: RAI applies it and never creates, alters or drops it. The tag
should carry no ALLOWED_VALUES — RAI writes true, as it does to its own
tag, and the value is not configurable.
The deploy role needs, on that tag, APPLY to set it, and USAGE on the
database and schema holding it to read it back: ownership is checked with
SYSTEM$GET_TAG, which resolves the tag by name and fails without that
visibility. APPLY alone lets a deploy mark its objects and then leaves every
ownership check unable to see the mark.
Four things to know before setting it:
- One tag per model. Teardown removes every object in
deployment.schemaand the meta schema whose tag reads backtrue, so two models that share a schema and a tag tear each other down. Name it for the model it belongs to —<DB>.<TAG_SCHEMA>.RELATIONALAI_MANAGED_<MODEL_NAME>— and never point a second model at it. - Reserve it for RAI. A deploy overwrites what the tag marks, and
SYSTEM$GET_TAGreports a value, not who set it, so RAI cannot tell a hand-tagged object of yours from one of its own. - Set it before the first deploy. Changing it afterwards leaves the already-tagged objects reading as unmanaged, and the next deploy refuses to overwrite them.
- Never apply it to a schema. Snowflake makes objects inherit a schema’s tags, so every object in that schema would read as RAI-owned.
.auto_deploy
DeploymentConfig.auto_deploy: boolAutomatically deploy the model before running queries.
.schedules
DeploymentConfig.schedules: dict[str, ScheduleConfig]Named refresh cadences. Each key is the schedule name (letters, digits
and underscores; must start with a letter). Outputs attach to a schedule
via outputs.
.outputs
DeploymentConfig.outputs: OutputsConfigDefault reasoner / materialization / schedule for outputs, plus per-output overrides.
.max_parallel_exports
DeploymentConfig.max_parallel_exports: (int, optional)Maximum number of LQP exports that run in parallel during a refresh (Snowflake only). If unset, the value is taken from the active warehouse’s MAX_CONCURRENCY_LEVEL, falling back to 8.
.max_concurrent_refresh_blocks
DeploymentConfig.max_concurrent_refresh_blocks: (int, optional)Maximum number of refresh plan blocks to dispatch concurrently within a single refresh run (Snowflake only). Blocks are still ordered by their dependencies, so fewer blocks may run concurrently when the plan has dependency barriers. Set to 0 to dispatch all ready blocks at once. If unset, the value is taken from the active warehouse’s MAX_CONCURRENCY_LEVEL, falling back to 8.
.suspend_after_mins
DeploymentConfig.suspend_after_mins: (int, optional)Convenience method for development (Snowflake only). If set, the refresh procedure
auto-suspends all refresh tasks in the meta schema once this many minutes
have elapsed since the last deploy finished, so every deploy restarts the
budget. Intended to bound development costs; leave unset in production.
Once suspended, change or unset this field and redeploy to resume: a bare
ALTER TASK ... RESUME does not stick, because the next run re-evaluates
the same threshold.
.meta_schema
DeploymentConfig.meta_schema: (str, optional)Override the schema used to store RAI metadata (procedures, plan table,
refresh log). When unset, defaults to <schema>_META.
.preserve_column_case
DeploymentConfig.preserve_column_case: boolPreserve the capitalization of column names when deploying to Snowflake.
For example, a model field named EntityId will deploy as column
EntityId, instead of ENTITYID. This currently applies only to
column names, not table names. In SQL, preserved names are
case-sensitive and must be quoted exactly, such as "EntityId".
.allow_recompute_fixpoints
DeploymentConfig.allow_recompute_fixpoints: boolPermit the direct-SQL compiler to deploy recursive SCCs that require full
recomputation. Defaults to False because refresh work can grow
without a useful incremental bound.
.pat_secret
DeploymentConfig.pat_secret: (str, optional)Fully-qualified Snowflake secret name (db.schema.secret) holding the
deploying user’s Programmatic Access Token; sent to the reasoners as an
X-User-Pat header on every scheduled refresh (Snowflake only). Must
be set together with pat_eai.
.pat_eai
DeploymentConfig.pat_eai: (str, optional)Snowflake External Access Integration name required to read the PAT
secret. Must be set together with pat_secret.
.pat_user
DeploymentConfig.pat_user: (str, optional)Snowflake user represented by the PAT and sent as x-user-id. Must be
set together with pat_warehouse; configured Prescriptive Problems
require both PAT field pairs.
.pat_warehouse
DeploymentConfig.pat_warehouse: (str, optional)Snowflake warehouse available to the PAT user and sent as
x-user-warehouse. Must be set together with pat_user.