Alias
relationalai.semantics.frontend.base
Alias(source: Variable, alias: str)Represents a DSL value labeled with an output alias.
Alias objects are typically created via Variable.alias and are used
to name selected outputs (and enable indexing a fragment by that name, for
example query["AGE"]).
Parameters
Section titled “Parameters”
(sourceVariable) - The underlying value being labeled.
(aliasstr) - The name to attach to the value in query outputs.
Most users should not instantiate this class directly. Prefer
Variable.alias.
Methods
Section titled “Methods”.__format__()
Section titled “.__format__()”Alias.__format__(format_spec: str) -> strReturn the placeholder used when formatting this alias in readings.
This is mainly used when interpolating values into relationship/property
reading strings (see Concept.__format__). When the aliased value
is a Concept, formatting the alias is equivalent to formatting
the concept with the alias name as the field name.
Parameters:
(format_specstr) - Additional format spec. This is only allowed when the aliased value is not a concept.
Returns:
str- A placeholder string for use in a reading.
Raises:
relationalai.util.error.RAIException- If the aliased value is a concept and an additionalformat_specis provided.