Skip to content
← All release notesNewanfra0.19.0

More relationship types, and AI context, in AML

Relationships can join on composite keys, match a row to a range, go many-to-many and filter either side, and models, datasets and fields can carry `ai_context` for agents.

Relationships

  • Composite keys: a many_to_one or one_to_one relationship takes extra on key pairs.
  • Ranges: type: 'range' matches a row to the row whose window contains it, such as a price band or a slowly changing dimension (SCD Type 2).
  • Many to many: type: 'many_to_many' joins two models on a condition you write.
  • Filters: where restricts the match on either side, inside the join, so rows on the measure side aren't dropped.

The relationship(a.x > b.id, true) shorthand still makes a single-key relationship. Write the others in full, with RelationshipConfig.

AI context

ai_context on a model, a dataset, a dimension, a measure or a metric holds what an agent should know about it, beyond its description.

The anfra skills know both, so your coding agent can write them.

Full changelog (opens in a new tab)