Create your Entities

Once DinMo is connected to a source, creating a Data Model teaches DinMo the business context to the tables stored in the DataWarehouse.

DinMo relies on the Data Model to guide its interpretation of the datasets stored on your DataWarehouse source. By utilizing the Data Model, DinMo can accurately identify which table corresponds to your customers, which table corresponds to your orders, and so forth.

Each of these objects should be linked to a corresponding entity in the Data Model. Specifically, there ought to be a distinct entity for your customers, a distinct entity for your orders, and so on. Finally, all the relations between the different entities should be stored in the Data Model.

For instance, the Customers entity might be related to the Orders entity through the field customer_id, with a relation of type 'BELONGS TO'. This simply means that one customer can have multiple orders.

For e-commerce, typical data model includes the following entities:

  • Customers (related to the Orders Entity)

  • Orders (related to the Customers and Order Lines Entities)

  • Order Lines (related to the Orders and Products Entities)

  • Products (related to the Order Lines Entities)

Additional entities (for instance, web events) are sometimes added if data is available on the source.

  1. To create your entities, go to the Data Model section in the navigation bar. Then, for every entity of interest, do the following steps:

  2. Click "New Entity" in the upper right.

  3. Specify whether the entity you wish to create is a Dimension, or a Fact. Dimensions refer to objects or individuals such as customers, while facts refer to temporal events, such as conversions.

  4. You can then either create your entity using an SQL query, or using the table selector. For simplicity, we recommend using the Table Selector, but you might want to use the SQL query if your database is not properly preprocessed.

  5. If you create your entity using the table selector, you will need to choose the corresponding source, dataset and table from which to create your entity. Keep in mind that one entity should refer to one table in your DataWarehouse.

If you create your entity using the SQL query, simply write your query and click "Run Query".

  1. Before clicking "Continue", you may deselect some properties that you want to hide, in the right part of the screen. You can also rename the properties using friendly names. Finally, you can define categorical properties. Categorical Properties are properties which have a limited number of distinct values, for instance, the Product Type, or the Country. By defining a property as categorical, it will be displayed in a much more intuitive manner when creating filters using this property:

  2. When you are done, click "Continue".

  3. Fill in the required information in the Configure page:

    1. Enter the entity class, which will be used to compute specific metrics related to the class

    2. Enter the entity name

    3. You might add a description to your entity

  1. Configure the field mapping. For Dimensions, you will need to specify which field should be used to uniquely identify each element of the entity. This field is called the primary key. For Facts, you will also need to specify a primary key, but also a timestamp field corresponding to the timestamp of the event. You may optionally add additional mappings.

  2. Create appropriate relations with other existing entities. You will need to specify for both entity which field should be used to join the data, and what type of relation it corresponds to: "HAS ONE", "BELONGS TO" or "HAS MANY". For instance, a customer has many orders, and an order belongs to a customer.

  3. Click "Continue" on the upper right, then "Create".

Last updated