Documentation Index
Fetch the complete documentation index at: https://honeydew.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Entity
An Entity in Honeydew is defined as “a collection of stuff that shares the same granularity”. For example in TPC-H, we can make an entity calledorders - all the data we have per orders.
The orders entity is based on a TABLE in Snowflake, that has a unique key column in it (orderkey), and one row per order. All properties of a single order are in the columns.
Granularity Key
The most important thing in an Entity is its “Granularity Key”. This is what defines what is a unique instance of the Entity - for example inorders entity, the key is orderkey defining a unique order.
An entity can be key-less, but there is significant limitations to key-less entities, the most important is that it only be the higher granularity of every entity related to it.
Metadata
Entities may include metadata such as their owner, business description, labels. See metadata section for more details.Source Data
Source data for an entity is set in its Source Data definition. Entities don’t have to be based on a physical table in the data warehouse. Following source data types are possible:- A physical table or a view
- A custom SQL query that defines the data for the entity
- A virtual entity, that is based on a calculation
Virtual Entity
An Entity is defined by its granularity key and source table. However, sometimes that granularity comes from attributes that exist in the semantic model.Use Cases
There are few reasons to make a virtual entity:- Nested or Denormalized data tables that include few levels of granularity together.
- Build 1:many relationships to a level of granularity that is not an entity key.
Interface
For a virtual entity, must define:- Source entity (it can be virtual as well)
- Granularity key that comes from the source entity
- Attributes that come from the source entity that are at the virtual entity granularity
user_id column and a user_name, that is per user_id and is duplicated in the event table.
If you have an events entity (on the event table), can build from it a users entity with user_id as key, and user_name as an attribute.
Virtual entity key
Virtual entities have a single granularity key - multi-attribute granularity is not supported. NULL key values are filtered.YAML Schema
Each entity is defined by a YAML file in Git, which also tracks and preserves the full history of every change. The schema for entity is:name: Name of entitydisplay_name,owner,description,labels,tags,folder,hidden: Metadatakeys: Granularity keys of entity (can be multiple). Attributes must exist either in dataset or as calculated attributes.key_dataset: Reference to source table (see below)is_time_spine: If the entity is a time spine, used for time metricsmetadata: Additional metadata for the entity (see examples for AI)