Features

Features are entity-level attributes, representing all the things we know of entities. Lynk makes it simple to create features, based on related data assets or related entities.

Features represent the business logic of enriching entities with information based on other related assets or entities.


Types of features

Field

Field features are great for enrichments from one-to-one or many-to-one relations. It is commonly used to enrich an entity with simple, non aggregate fields from one-to-one related assets or entities. See more in depth information on Field features.

Metric

Metric features are great for aggregations from one-to-many relations. It is commonly used to enrich an entity with aggregated fields from one-to-many related assets or entities. See more in depth information on Metric features.

First-Last

First-Last features are great for enrichments of fields from one-to-many relations. It is commonly used to enrich an entity with fields of the first or last appearance of a one-to-many related assets or entities. See more in depth information on First-Last features.

Formula

Formula features are used when we need to create calculated features on top of other features. It is commonly used to enrich an entity with more complex calculations that require multiple aggregations or calculations to be done first. See more in depth information on Formula features.


Chaining features

Lynk supports creating features based on previously created features on related entities.

For example, let's assume we have an entity called user and another entity called team, with in a many-to-one relationship. 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.

This allows building consistent, accessible and governed business logic - See chaining features for in depth information about this.


Consuming features

Features are consumed via SQL API, REST API or via Lynk Playground.

For example, here is a simple SQL API request to get some features defined on a customer level:

-- A simple SQL API query

SELECT  customer_id,
        total_order_amount,
        first_order_date,
        last_order_status
FROM    entity('customer') 
WHERE   country = 'US'
LIMIT   100

See consume for in depth information on this.


Time aggregations

Lynk separates between business logic and time aggregations like rolling_window on the consumption layer. See time aggregations for in depth information on this.


Governance

Lynk Governance makes sure features are unique and trusted:

  • Features have unique names

  • Features have unique definitions

  • Monitoring relationship type to make sure feature definitions won't break

Last updated