1. Creating data model Click on the icon at the top left of the dataset page to enter the New Dataset page, and click on the Data Model entry to enter the Model Edit page. 1.1 Add model node The data model supports adding nodes in two ways. •Drag and drop a dataset from the resource tree on the left into the dataset edit area. Datasets other than composite dataset, MDX dataset, and streaming dataset can be added. •Expand the tables and views node of the connection and drag and drop a table or a view into the dataset editing area.Drag and drop is not supported for tables under the data mart connection. If there are columns with the same name between multiple nodes, the names and aliases will be automatically modified so that they will not be renamed, and the user can also modify the aliases themselves for adjustment. If the node cannot push down the database, it is marked with orange. 1.2 Add relationships between model nodes relationships between nodes are established by dragging and dropping an join column on a node onto the corresponding join column of another node. ➢Note: Columns that establish relationships between nodes require field type matching. Refer to the list below for relationship types: [td]Relationship type | Description | one to many (or many to one) | Values in two node join columns that are unique on one side and have duplicate values on the other side, such as a department-employee relationship, where multiple employees exist in one department. | one to one | The values in the join columns of both nodes are unique, such as the relationship between an employee and an employee number, where an employee corresponds to an employee number. | many to many | The values in both node join columns have duplicate values, for example, the relationship between employees and projects, where an employee is responsible for more than one project, and a project has more than one employee sharing responsibility. |
The effect of displaying different relationship types is shown in following : ➢Note: The system will select the most appropriate model relationship based on your data. For performance implications, users should try to select the correct model relationship. ➢Note: There can only be one relationship between two nodes, if there are multiple relationships, please use the calculated columns to splice the columns you want to be join with and then use the calculated columns to build the relationship. Example: If you need to add the relationship between firstname and lastname, you can add the relationship between firstname and lastname after forming a column by calculating the column. The relationship of multiple nodes cannot be in a ring, nor can there be isolated nodes. As shown below, a ring exists if two dimension tables are associated with two fact tables at the same time: It can be adjusted to: 2. Edit data model •Click on the blank area of the edit panel, the metadata panel on the right displays all the node structure information, and all data columns can be edited. •Click on a single node to display single node structure information, you can edit the data columns and filters of the selected node. Hover to the header section of the node and the actionable menu appears: [Add Filter] Same as Add Filter in the metadata panel, you can add filter conditions to the original columns or details calculation columns. [Expand] [Collapse] Collapse or expand this node. [Open Connection] If the node comes directly from a data source table or view, you can open the data source through this portal. [Open Dataset] If the node comes from a dataset, you can open the dataset through this entrance. [Rename] Rename the node. After renaming, the node names in the Metadata panel are synchronised. [Copy] [Paste] Copy nodes. You can select multiple nodes to copy and paste. Shortcut keys are also supported for copying and pasting. [Delete] Delete nodes. Multiple nodes can be selected for deletion. Shortcut key deletion is also supported. [Expand All] [Collapse All] allows you to expand and collapse all the nodes in the panel. •Click on the relationship line to display the relationship information, and you can edit or delete the model relationship. Deleting relationships via shortcut keys is also supported. If there is a one-to-one relationship on the data, when changing it to one-to-many or many-to-one or many-to-many, a red icon appears with the message: one-to-one relationship is recommended. If it is a one-to-many relationship, changing it to one-to-one or many-to-one pops up an error message (e.g. below). Click OK and the relationship returns to its previous state. If you change it to a many-to-many relationship, an icon will appear: it is recommended to use a one-to-many relationship. If it's a many-to-one relationship, the logic is the same for many. If it is a many-to-many relationship, changing it to one-to-one or one-to-many or many-to-many will also prompt that it cannot be modified. Click OK and the relationship returns to its previous state. •Model Editing Panel Toolbar [Auto Layput] Automatically adjusts the layout of model nodes. [Zoom Panel] The panel can be resized using the drop-down menu and slider. [Adaption] Click Adaption to adjust all nodes to the visual range. [Show Navigation] [Hide Navigation] allows you to show and hide the navigation view, and the navigation view allows you to quickly adjust the panel viewing area. 3. Editing metadata Single nodes support previewing data and displaying row count, while the whole model does not support previewing data and displaying row count. The node directory shows only the detailed columns of this node. The node directory supports subdirectories, so you can drag or move columns of this node to a subdirectory. You cannot move columns from one node to another node or subdirectory. Hierarchies cannot be created across nodes in the data model; hierarchies cannot be created with measure columns. The New Calculation Column window opens up aggregate functions and Level of Detail Expression functions to support the creation of aggregate calculation columns. New aggregated columns are placed in the root directory. Aggregated calculations support calculations using columns from multiple tables. The new detail column is placed under the corresponding node, and the detail column only supports calculating with the columns of a single node, but not with the columns of multiple tables. Analytical algorithms in the data model may use only the original columns of this node and the detail calculation columns that depend only on the columns of this node. 4. Data model acceleration Model calculations support in-memory calculations, push-down database calculations, and mart calculations as well. With a single node selected, you can click extract data to extract the node data to the VooltDB dataset, and after all nodes are extracted from the dashboard, any bound execution data on the dashboard will go to the VooltDB dataset calculation. ➢Note: •Selection of data models for the Import Data to Data Mart, Incremental to Data Mart in the schedule task is not supported. •Node extraction in the data model is only supported for VooltDB. •Extraction is not supported when the node is a data mart dataset. 5. Use of data modelling in create dashbord Once the data model has been created, on the Create dashbord page you can drag and drop different node fields of the established relationship into the dashboard component at the same time for analysis. Hover over a bound field to display the source table and field name for a quick view of the data source. 6. Summary of other considerations •The data model cannot be used in composite dataset and self-service dataset. •The data model can filter only the original columns of this node and the detail calculation columns that depend only on the columns of this node in the dashboard's filter columns and date filter columns usage. •The data model does not support true page. |