Version:

Entity

Define the entities used in a Profiles project.

Entities are defined in the pb_project.yaml file. They are used throughout a Profiles project and consist of names for the entities and the types of ids associated with each for ID stitching and feature creation.

You can also assign a custom ID stitcher and/or a feature view with specific id_types as the view’s primary key.

entities:
   - name: entity_name
     id_column_name: column_name
     id_stitcher: models/custom_ID_stitcher_path   # Optional
     id_types:
         <id_types-config>
     feature_views:     # Optional
         using_ids:
            - id: id_type
              name: view_name
KeyDescription
name
Required
Entity name.
id_column_nameName of the main ID column for an entity. If not provided explicitly, its value is set to <entity_name>_main_id.
id_stitcherModel path for customer ID stitcher. If left blank, the default ID stitcher is used.
id_types
Required
List of the identifier types associate with the entity.
feature_viewsList of name and id_type (primary key) for each view.

Example

# Case 1: Minimal example
entities:
    - name: user
      id_column_name: user_rud_id
      id_types:
         - email
         - user_id

# Case 2: With a custom ID stitcher
entities:
    - name: user
      id_stitcher: models/custom_id_stitcher
      id_types:
         - email
         - user_id

# Case 3: With a feature view
entities:
    - name: user
      id_types:
         - email
         - user_id
      feature_views:
         using_ids:
            - id: email
              name: customer_profile_by_email

Note that for the first case in the above example, the id_column_name is explicitly set to user_rud_id.

In the other cases, id_column_name is not explicitly specified, so this field is set to user_main_id by default.



Questions? Contact us by email or on Slack