Skip to content

Configure a model

Use this table to find the setting for what you want to change:

SettingUse it when
model.implicit_propertiesYou want accessing an undeclared property to raise an error instead of creating it, for example before deploying to production.
model.pathYou are deploying a model and want to point PyRel at its entry point script or directory.
deployment.public_schemaYou want to choose the Snowflake schema and role a model deploys to.
deployment.identity.internal_schemaYou want to choose where PyRel stores the deployment’s own internal objects and metadata.
deployment.schedulesYou want to control when a deployed model’s outputs refresh after deployment.
deployment.materializedYou want to choose whether the data behind deployed outputs is stored in Snowflake tables.
deployment.incrementalYou want the data behind deployed outputs stored in Snowflake dynamic tables.
deployment.overridesYou want per-output settings or access policies for deployed outputs.
deployment.tagsYou want your own Snowflake object tags on everything a deploy creates, for cost attribution, classification, or tag-based policies.
deployment.preserve_column_caseYou want deployed Snowflake columns to preserve the capitalization of model field names.
oplog.enabledYou want to override or explicitly declare whether rai models deploy records change history for the shared-model synchronization workflow.

By default, PyRel creates a property the first time you access it, even if you never declared it. Set the model.implicit_properties configuration option to false to require every property to be declared before use, so that accessing an undeclared property raises an error. This check happens when Python builds the model, including when deployment loads your model entry point.

  1. Set model.implicit_properties in raiconfig.yaml

    connections:
    # ...
    model:
    implicit_properties: false
  2. Inspect the parsed config

    from relationalai.semantics import Model
    m = Model("MyModel")
    print(m.config.model.implicit_properties)

    A printed value of False confirms that PyRel loaded the implicit_properties setting from your config.

Each example should print False. This confirms the configuration value, not that every property in your model has been declared. If the value differs, check which configuration file or programmatic config you passed to Model. If building your model then raises an undeclared-property error, correct the property name or declare it before use.

model.path points PyRel at the script or Python package directory that defines your model, for example model.py. It has no default (None).

Deployment and related tooling use model.path to locate your model. For example, rai models deploy deploys the model at model.path when you do not pass an explicit --path option to the command. Setting model.path does not import the entry point when you create a Model instance.

  1. Set model.path in raiconfig.yaml

    connections:
    # ...
    model:
    path: model.py
  2. Inspect the parsed config

    from relationalai.semantics import Model
    m = Model("MyModel")
    print(m.config.model.path)

    A printed value of model.py confirms that PyRel loaded the path setting from your config.

Each example should print model.py. This confirms the configuration value, not that the entry point exists or loads successfully. If the value differs, check which configuration file or programmatic config you passed to Model. See Deploy a model to load and deploy the entry point.

Set the deployment target is now covered in Configure deployment.

Configure object name prefixes and suffixes is now covered in Configure deployment.

Configure op log recording is now covered in Configure deployment.

Use a standard op log table for a transient deployment target is now covered in Configure deployment.

Schedule output refreshes is now covered in Configure deployment.

Define a schedule is now covered in Configure deployment.

Assign outputs to schedules is now covered in Configure deployment.

Skip the deploy-time refresh is now covered in Configure deployment.

Auto-suspend test schedules is now covered in Configure deployment.

Configure deployed outputs is now covered in Configure deployment.

Choose how outputs are materialized is now covered in Configure deployment.

Configure access policies is now covered in Configure deployment.

Apply a row access policy to deployed outputs is now covered in Configure deployment.

Apply a projection policy to output columns is now covered in Configure deployment.

Apply a masking policy to output columns is now covered in Configure deployment.

Combine output policies is now covered in Configure deployment.

Check the result with consumer roles is now covered in Configure deployment.

Recover from unavailable policies is now covered in Configure deployment.

Tag deployed Snowflake objects is now covered in Configure deployment.

Preserve output column case is now covered in Configure deployment.