ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Meta attributes setup

Entities setup is usually done by the Meiro team. 

In the Administration/Entities/Meta attributes tab, it is possible to set meta attributes that will be used through Meiro Business Explorer.

Learn more: about meta attributes here.

What it is?

Meta attributes are a solution to streamline and avoid redundancy in attribute logic by allowing the definition of common processes or calculations (such as aggregating product information) in a centralized manner. These attributes, stored in a table like public.meta_attributes, are created with a specified name and corresponding query, functioning as reusable, convenient components that can be seamlessly integrated into multiple attribute calculations, offering both speed and efficiency in data processing. This approach eliminates the need for duplicating logic across various attributes and simplifies maintenance, enabling changes or updates to be made in a single location, ensuring consistency throughout the data model.

Meta attribute list

Nov-14-2023 13-55-43.gif

You may specify the order of meta-attributes calculation on the list of meta-attributes through a simple drag-drop system. 

To streamline this process and examine meta attributes rapidly, use the SQL preview on the meta attributes list.

Remember: Meta attributes should not be defined in terms of other Meta attributes. Doing so can create hidden dependencies, and the execution order of Meta attributes is not guaranteed. This may lead to unexpected failures, as the SQL planner can evaluate them in different orders, regardless of their definition.


Create a meta attribute

To create a meta attribute, click the ‘Create Meta Attribute’ button and complete the form.

General

Meta attribute ID

(required, not editable later)

Insert a unique identifier of the meta attribute. It can not be the same as any other attribute or meta attribute. Meta attributes’ IDs are case-sensitive.

Description

Description 

(optional)

An optional field to draw a description of a meta attribute. The meta attributes and descriptions will be visible within the Meta attributes list.

Definition

The definition of a meta attribute dictates the query you want to have available as a Common Table Expression (CTE). 

 

SQL query

(required)

The custom option allows managing attribute definition through an SQL query.

 

- Use multi-line comments /* comment */ instead of single-line comments --, as single-line comments can cause errors when saving.

- Inline -- comments may work, but only if they do not begin at the start of a line. To avoid confusion, prefer multi-line comments.

 

 

Remember: It is not allowed to query the customer_events table.