Step by step creation of a data model
User Interface: 6.1.0-Warcraft
Introduction
To facilitate the process of creating an Data Model, the Control Panel has a creation wizard that simplifies and guides the user through the process.
The process of creating an Data Model is divided into three steps:
Fill in the general information.
Define the JSON schema.
As an example, we are going to add the Data Model corresponding to “Gardens” corresponding to the parks and gardens domain of the Smart Data Models program. The JSON file that we are going to use can be consulted from this link.
To create a data model, a user account with an “Administrator” role must be used.
Steps
Create the Data Model
From the Control Panel, navigate to the Administration > Data Models Management menu.
This will take us to the list of available Data Models. To create the m, click on the "+" button at the top right of the screen.
Fill in general information
This will open the Data Model creation wizard, where we will have to enter some basic information (all fields are required):
Name: The unique name with which to identify the Entity.
Data Mode Type: The category of data models to which it will correspond. The following options appear in the drop-down menu:
Labels: Tags to characterize the model, which will be used for filtering when searching.
Description: Extended descriptive text of the model, such as its use, properties, characteristics, etc.
For the example, the fields have been filled in as follows:
Add JSON schema
The next step is to paste the JSON schema of the entity in the box provided.
In the case of the gardens example, we would copy the JSON file from the GitHub repository, and paste it directly:
Once these options are configured, click on the "Create" button to finish the creation of the Data Model.
You will then return to the list of data models, where the newly created model will appear.
IMG PENDIENTE
How to use the Data Model in an Entity
To use the data model we have just created, we will have to create a new Entity, something we explain in detail in this guide:
In the “Define Entity Schema” section, when displaying the templates, we will have to look in the category corresponding to the one we have indicated when creating the data model template, which in the example corresponded to “Smart Data Models”.
Once selected, the Entity's properties will be displayed on the right side:
When generating the schema, we can see an example of an instance of the Entity: