Version:

Features

Learn about features in Profiles.

This guide introduces you to the concept of features in Profiles and shows 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
      - entity_var:
          name: last_seen
          select: max(cast(timestamp as date))
          from: inputs/rsPages
      - entity_var:
          name: user_lifespan
          select: '{{ user.last_seen }} - {{ user.first_seen }}'

Best practices

  • An entity_var will automatically group records from a source input or model by customer, so you need only to specify an aggregate function in the select field.
  • Every entity_var is included in feature_views by default.
  • To use an entity_var to create another entity_var but not include it as a feature, add is_feature: false to the entity_var definition.


Questions? Contact us by email or on Slack