Python package and CLI 1.21.0
PyRel 1.21.0 introduces a new public preview feature called deploy mode that lets you deploy a PyRel model to a Snowflake schema as SQL tables and views.
How to install this version
Review the changes below before installing. To install this version, activate a compatible Python virtual environment and run:
python -m pip install "relationalai==1.21.0"For the latest installation instructions, see Start building with PyRel.
New Features and Enhancements
Section titled “New Features and Enhancements”-
PyRel
1.21.0introduces a new public preview feature called deploy mode that lets you deploy a PyRel model to a Snowflake schema as SQL tables and views. For more information, see Deploy a model. -
Improved the clarity of error messages when you define membership between concept types that do not match in
Model.define(). Before this release,m.define(Target(Source))could fail with a generic type-mismatch message that did not tell you how to fix the model. Now the error explains compatible fixes, such as makingTargeta subtype ofSourceor usingAnyEntitywhen you intentionally allow heterogeneous membership. This example shows one invalid definition and two valid fixes:from relationalai.semantics import AnyEntity, Modelm = Model("Demo")SourceConcept = m.Concept("Order")# Invalid: TargetConcept does not extend SourceConcept.TargetConcept = m.Concept("NeedsReview")m.define(TargetConcept(SourceConcept))# Valid fix 1: make the target concept a subtype of SourceConcept.TargetSubtype = m.Concept("OrderThatNeedsReview", extends=[SourceConcept])m.define(TargetSubtype(SourceConcept))# Valid fix 2: use AnyEntity when membership should accept mixed concept types.TargetAnyEntity = m.Concept("NeedsReviewAny", extends=[AnyEntity])m.define(TargetAnyEntity(SourceConcept))