Skip to content

DerivedColumn

relationalai.semantics.frontend.base
DerivedColumn(
table: DerivedTable,
index: int,
name: str | None = None,
type_: Concept | None = None,
)

Represents one output column of a DerivedTable.

A derived column is produced by query-like results such as Fragment and is typically accessed via iteration (for c in fragment) or indexing (fragment[0] or fragment["alias"]).

Most users should not instantiate this class directly.

DerivedColumn.__getattr__(item)

Return a chained relationship reference for attribute access.

Accessing an attribute on a derived column (for example fragment[0].name) returns a Chain rooted at this column. If the column has a known concept type, relationship lookup is resolved on that type; otherwise an unresolved property on Any is used.

If the attribute name starts with an underscore, this method defers to normal Python attribute access so internal attributes remain accessible.

Parameters:

  • item

    (str) - Relationship/property name to access.

Returns:

  • Chain - A chained value representing the relationship reading.

Raises:

  • relationalai.util.error.RAIException - Raised if relationship lookup is resolved on a typed concept and that concept does not declare the relationship while implicit properties are disabled.
DerivedColumnVariableDSLBase
 semantics > frontend > base
└──  DerivedTable
    ├──  __getitem__
    └──  __iter__