Skip to content

Python API Release Notes

1.19.3

Python SDK


Version 1.19.3 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

Bug Fixes

  • Fixed a regression in 1.19.2 that broke exports into Snowflake destination tables with Table targets when you call .into(Table(...)) on a query result. This now works as expected.

  • Fixed an issue that caused expressions like where(x | y).define(...) to raise an Unused variable declared error when both sides of the | operator contained calculated values. These expressions now evaluate to the expected value.

1.19.2

Python SDK


Version 1.19.2 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

New Features and Enhancements

  • Improved reasoner-name validation in rai reasoners create. Invalid names are now rejected earlier with a clearer message, instead of failing later during provisioning. This makes naming mistakes easier to spot before reasoner setup starts.

Bug Fixes

  • Fixed a name-resolution regression in rai reasoners create --name. Before 1.19.2, an invalid default reasoner name from configuration (for example, a username-derived fallback) could still block a valid explicit --name value.

1.19.1

Python SDK


Version 1.19.1 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

Bug Fixes

  • Fixed queries against Snowflake tables declared with Table when the table name or stored column spelling requires quoting, including case-sensitive names and names that contain spaces, punctuation, and Unicode characters. For example, the following query now resolves both the quoted table name and the quoted column name correctly:

    from relationalai.semantics import Model
    
    m = Model("demo")
    orders = m.Table('"table with spaces"')
    
    m.select(orders["id"], orders["column one"]).to_df()
    

    Previously, this could raise a RAIException such as [Unknown Table] Failed to fetch schema for table '"table with spaces"'.

1.19.0

Python SDK


Version 1.19.0 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

Bug Fixes

  • Fixed queries that read two fields from the same multi-field Property in one select(), such as select(invoice.total["currency"], invoice.total["amount"]). Before 1.19.0, PyRel could incorrectly return every combination of the fields' values instead of keeping the original pairs together. This bug only impacted Property instances and not Relationship instances, which always return the stored pairs correctly.

1.18.0

Python SDK


Version 1.18.0 of the relationalai Python package is now available!

To upgrade, activate your virtual environment and run the following command:

pip install --upgrade relationalai

New Features and Enhancements

  • rai doctor report now generates a deterministic diagnosis.md summary and shows the same diagnosis in the debugger report browser. Before 1.18.0, you had to inspect the collected artifacts yourself to identify likely configuration, Snowflake, deploy, schema-cache, trace, or collection problems.

  • PyRel now fails fast on undefined config references instead of ignoring them or failing later at runtime. For example, a typo in active_profile such as active_profile: localm now raises a clear validation error during config loading.

Bug Fixes

  • Fixed math.clip() so it returns the clipped value instead of NULL when the input falls below, within, or above the requested bounds.

  • Fixed how reasoner names are generated. If you don't set custom reasoner names in your configuration, provisioning could previously fail when your username starts with a digit because the generated reasoner name was invalid. PyRel now sanitizes the generated name automatically, for example by turning 12345 into user_12345.

  • Fixed nested select() values inside union and match branches, and fixed aggregates over scalar subquery values, so those query shapes return the expected rows instead of raising internal compiler or validation errors.

  • Fixed rank() queries that also return a related value in the same result. Those queries now return the expected table and use NULL when the related value is missing instead of failing validation.

  • PyRel now raises an Ambiguous concept usage error when one rule reuses the same concept name as both a variable and a concept type in the same line. For example, the following code now raises an error instead of silently misinterpreting the second line:

    from relationalai.semantics import Model, String
    
    m = Model("ambiguous")
    A = m.Concept("A")
    B = m.Concept("B", extends=[A])
    C = m.Concept("C", extends=[A])
    D = m.Concept("D", extends=[B, C])
    
    A.id = m.Property(f"{A} is identified by {String}")
    A.identify_by(A.id)
    
    m.define(A.new(m.data([
        {"id": "w"},
        {"id": "x"},
        {"id": "y"},
        {"id": "z"},
    ]).to_schema()))
    m.define(B(A)).where(A.id.in_(["w", "x", "z"]))
    m.define(C(A)).where(A.id.in_(["w", "y", "z"]))
    
    # Unambiguous: B is a variable in both places.
    m.define(D(B)).where(C(B))
    
    # Ambiguous: B is variable in D(B) but a concept type in B(C).
    m.define(D(B)).where(B(C))  # now raises "Ambiguous concept usage"
    

    Previously, PyRel would silently define every entity of type B as a D in this case because the type expression B(C) doesn't constrain the variable B in .define() in any way.