profiles.yaml
profiles.yaml file that defines the Profiles semantic models.less than a minute
The profiles.yaml file defines the Profiles semantic models using models and var_groups.
modelsare defined by themodel_typeand consist of prepackaged SQL code that takes your inputs and runs it in your warehouse to output the defined views and tables.var_groupsdefineentity_varandinput_varused to define the features for feature views.
models:
<model-config>
var_groups:
<var-group-config>| Key | Description |
|---|---|
model_configRequired | Model configuration - see the specific model for details. |
var_groupRequired | Configuration for the features. |
Models
Example
models:
- name: user_id_stitcher
model_type: identity_stitcher
model_spec:
entity_key: user
materialization:
run_type: incremental
edge_sources:
- from: inputs/rsIdentifies
- from: inputs/rsTracks
var_groups:
name: user_features
entity_key: user #Name as defined in the project file.
vars:
- entity_var:
name: first_seen
select: min(timestamp::date)
from: inputs/rsTracks
description: First user appearance
- entity_var:
name: last_seen
select: max(timestamp::date)
from: inputs/rsTracks
is_feature: false
- entity_var:
name: user_lifespan
select: '{{user.last_seen}} - {{user.first_seen}}'
description: Lifespan of a user