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

Setup guide: attributes

The setup guide is for setting up Meiro Business Explorer, usually, it is done by the Meiro team.

In the Setup/ Attributes tab it is possible to set attributes that will be used through Meiro Business Explorer. A full list of attributes will be visible to users in the Data tab/ Attributes tab.

1. Create an attribute

To create an attribute, please click on the Create Attribute button and fill out the form. 

image-1631104234794.png

General

Attribute ID

(required, not editable later)

Insert a unique identifier of the attribute, attribute ID. It can not be the same as any other attribute. It is needed for further reference and it will be visible in the Meiro Integrations in exports as a column name. 

All operators on the string are case-insensitive.


Attribute ID will also be visible under the attribute's name in the Data tab. It is possible to search for the attribute by its ID.

Name

Name your attribute. The name will be visible across Meiro Business Explorer. If needed it is possible to edit the name later on. 

Sources

(not editable later)

Pick the right data source for this attribute. It will not be possible to edit it later. 

Description

Description

It is an optional field to draw a description of an attribute. A list of attributes and descriptions will be visible within the Data tab/ Attributes tab.

Labels

Assign the right label to your attribute. Labels help to manage attributes across the Meiro interface.

Learn more: To learn about labels, please go to this article

Data Settings


In the Data Settings section, you can set:

  • A single value (attribute for a customer will always have only 1 value) or multiple values.

  • Define the attribute as a single scalar value (number, string, boolean...) or compound (composed by dimensions. Each dimension has its own id, name, and scalar data type.)

Warning: After saving those fields it will not be possible to edit them. To make a change after saving attributes would need to be hidden and a new one created.


Single/ Multiple

It defines if the attribute can or can not hold single/ multiple values. The "single" attribute will always have exactly one value per customer, and "multiple" can have multiple values per customer.

Data type

Pick the right data type for your attribute.

For compound data types are mandatory to specify:

  • Dimension ID: Please insert here a unique identifier for the compound attribute. 
  • Name: Insert a name for the compound attribute. 
  • Data type: Pick data type for the compound attribute.

Definition


Definition of an attribute dictates how the value of the attribute for a customer should be calculated. The result of the calculation should be in the correct form to be in check with the data type. You have at your disposal several predefined calculations like most frequent, count, list, min, max, avg, and least frequent. On the other side, you can set up a totally custom attribute using SQL queries.

Знімок екрана 2023-01-04 о 10.50.05.png

Predefined

Event source: Select on what sources this attribute will be calculated, select from the drop-down list. If left empty, the attribute will be calculated from all sources. 

 

Event type: Select on what event types this attribute will be calculated, select event type from the drop-down list. If left empty, the attribute will be calculated from all event types from the selected sources.

 

Event version: Insert event version. It is possible to insert a single version or multiple versions. If left empty, the attribute will be calculated from all versions of the selected events.

 

Calculation type (required): Select calculation type from the drop-down list (for example least/ most frequent, sum etc.)


Weight (required): By default 1.


Input code fields for: Value (required)/ Outer value/  Filter/ Outer filter: Fill in those fields so it is corresponding to Meiro Integrations.

Custom

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

Remember: Newly created attributes will appear with the New badge that will stay for the next 7 days.

2. Edit/show-hide attribute

At any time it is possible to edit attributes. If needed It is possible to hide an attribute from the Meiro interface. 

It is not possible to edit Attribute ID, Sources, Data Settings. If changes are needed for those, It is recommended to hide the incorrect attribute and create a new one.

eidt.png

3. FAQ

How to display images for attributes?

To display images in an attribute, you need to create an attribute or compound attribute with data type “string” and in its definition prefix the image URL with "img::". For example:


select
       json_build_array(
       nfts.key,
       'img::'||nfts.value) as value
from (select * from base where source_id = 'crypto' and type = 'update' order by event_time desc limit 1)
join json_each_text(payload->'nft') as nfts ON true
where nfts.value is not null

You can also add "link::" before the URL, which will turn the URL into a clickable link.


This way, when you view the attribute for a customer, you will see the image rather than just a string: