You are viewing documentation for an older version.
Features
less than a minute
This guide introduces you to the concept of features in Profiles and explains how to define them in your Profiles project.
Overview
A Customer360 (C360) table contains various customer features. In Profiles, you can create these features using entity_vars which, in turn, can be created using an input, model or other entity_vars.
Usage
You can define features in the profiles.yaml file, as shown:
var_groups:
- name: user_features
entity_key: user
vars:
- entity_var:
name: first_seen
select: min(cast(timestamp as date))
from: inputs/rsPages
is_feature: false
description: First seen date
- entity_var:
name: last_seen
select: max(cast(timestamp as date))
from: inputs/rsPages
description: Last seen date
- entity_var:
name: user_lifespan
select: '{{ user.last_seen }} - {{ user.first_seen }}'
description: User lifespanBest practices
- An
entity_varwill automatically group records from a sourceinputormodelby customer, so you need only to specify an aggregate function in theselectfield. - Every
entity_varis included infeature_viewsby default. - To use an
entity_varto create anotherentity_varbut not include it as a feature, addis_feature: falseto theentity_vardefinition.