orders
- 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.
orders
entity, the key is orderkey
defining a unique order.
lineitems
entity, the key is a combination of orderkey
and linenumber
.NULL
values that you intend to use for key values
and join operations, it is recommended to create a new calculated attribute that replaces
the NULL values with placeholders (e.g., 'NULL'
or 'N/A'
) using the COALESCE function.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.
order_id
and line_id
then can create a calculated attribute in orders
for with SQL:
HASH(order_lines.order_id, order_lines.line_id)
, and then use it as the key of the virtual entity.order_id
only, can create a calculated attribute in orders
with SQL: CASE WHEN orders.valid THEN orders.order_id ELSE NULL END
, and then use it as the key of the virtual entity.name
: Name of entitydisplay_name
, owner
, description
, labels
, 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)