Lynk docs
  • Introduction
  • Reference
    • Data Modeling
      • Entities
      • Relationships
        • Entity-to-Entity Relations
        • Entity-to-Asset Relations
      • Features
        • Field
        • Metric
        • First-Last
        • Formula
        • Filters
        • Chaining Features
      • Measures
      • Data Assets
      • Time Aggregations
      • Lynk Functions
        • POP
      • Context
    • Consume & APIs
      • Authentication
      • SQL API
      • SQL REST API
      • Cache & Pre-Aggregations
    • Governance
    • Integrations
      • Git
      • Query Engines
    • AI Agents
Powered by GitBook
LogoLogo

Start now

  • Request Access

Website

  • Home
On this page
  1. Reference
  2. Data Modeling
  3. Features

Chaining Features

Features are reusable. It is possible to create features on an entity, based on features of another (related) entity. This makes it possible to create a full data pipelines within Lynk.

Chaining features is a critical component in Lynk's design.

Within Lynk everything is Semantically important, from raw data to final KPIs, making the whole data pipeline well defined centrally, structured, governed and highly accessible for AI not only to ask questions but also to build new features and semantic definitions on the fly.

Example - creating features from related entities

For example, let's assume we have an entity called user and another entity called team, and their relation is many-to-one. You can create a feature called is_active_user on the user level and consume it for creating a metric feature active_users_count on the team entity level.

# user.yml (user entity)

asset: user
...

measures:
- name: active_users_count
  description: count of active users
  sql: SUM(IFF({is_active_user}, 1, 0))
# team.yml (team entity)
...
features: 

- type: metric
  name: active_users_count
  asset: user
  field: active_users_count
  filters: null

PreviousFiltersNextMeasures

Last updated 3 days ago

Note that the asset in this case is the related entity name (see ).

related entities