Configuring Data Entities

NetCharts Performance Dashboards allows you to select specific tables and columns from your data source that you want to expose in Key Performance Indicators (KPI). In NetCharts Performance Dashboards we refer to these groupings as Entities.

This part of the tutorial will guide you through creating Entities based on the Northwind data source we configured in the previous section.

Choosing Tables

The first step toward creating Entities is choosing database tables. Here we will be creating four Entities from the Northwind database; these are CustomersOrdersOrder Details Extended and Products.

Note: If you did not click the Continue button on the Configure Data Sources dialog, either click it now, or click the Configure Data Entities link atop the Configure Data Source panel.

 
step1

The Configure Data Entities panel will appear.

HINT: If the Northwind data source is your only data source it will be automatically selected. When you have multiple data sources you will need to select the data source to manage its Entities.

 
step1
 
Click the green plus sign, plus,on the upper right hand corner of the Configure Data Entities panel, and the Add Data Entities panel will appear:
 
step1
 
The Add Data Entities panel is where you will select the database tables for your Entities. This panel has four sections, each one opened by clicking on the plus button, plus, on the right.
 
You will begin by adding the four Data Entities used in this tutorial. Once we have the Entities we will configure them accordingly.

HINT:The three checkboxes in the Entity section under Available Tables/Views individually disable features of the entity creation process. The Include all fields option includes all columns from the table. Uncheck Include all fields to individually select the columns to be exposed in the Entity. The Include suggested joins and Include suggested relationships each effect how database definitions are interpreted. Leaving both check boxes checked allows NetCharts Performance Dashboards to acquire the join and relationship information from the database, and build those into the Entity automatically. Unchecking either option will require you to define the join and/or relationship manually.
Note: If join and relationship information is not part of the database definition, you will need to build them manually by using the Joins and Relationships sections of the Configure Data Entities panel

From the Available Tables/Views drop down begin by selecting the public.customers table.
 
step1
 
Then click the Add button to select the table.
 
All the columns for the public.customers table will be selected and will fill in the Configure Data Entities panel behind the Add Data Entities panel.
 
step1
 
Continue selecting the other tables we will need for the tutorial: public.orders,public.order_details_ext, and public.products
 
Close the Add Data Entities panel by clicking the X button, , in the upper right corner.
 
Next we want to set the label of the table. On the public.products table, under the Label column, click the radio button next to the productname field. Setting the productname as the label will allow the Product Name to display on the final dashboard, when product records are referenced by ProductID.
 
step1
 
Now we want to define logical relationships between the tables. NCPD will automatically do this for most databases, however, this version of the Northwind database does not contain relationshipand join information as part of the database definition, so it must be added manually.
 
In the next section we will manually configure joins and relationships for each selected table. The main table of interest is public.order_details_ext. This table has fields that point to the products and orders table. The orders table has a field that points to the customers table.

Reopen the Add Data Entities panel by clicking on the green plus sign, plus, in the upper right and corner of the Configure Data Entities dialog.
 

Note: There are no field restrictions for this tutorial example. So there is no need to open the Fields section.

Creating joins and relationships

Click on the plus button, plus, adjacent to the Join line at the bottom of the Add Data Entities panel. This
will close the Entity section and open the Joins section.
Use the Type: drop down list to select LEFT for the join type:
 
plus
 
In the From section select public.order_details_ext as the Entity and Order ID as the Field. Then in the To section select public.orders as the Entity and orderid as the Field.
 
Check the Add corresponding relationship checkbox to automatically add the relationship based on the join.
 
plus
 
Click the Add button to create the join.
 
Next you will add the remaining joins that you will need to the tutorial.
 
In the From section select public.order_details_ext as the Entity and Product ID as the Field. Then in the To section select public.products as the Entity and productid as the Field.
 
Check the Add corresponding relationship checkbox to automatically add the relationship based on the join.
 
plus
 
Click the Add button to create the join.
 
Next, in the From section select public.orders as the Entity and customerid as the Field. Then in the To section select public.customers as the Entity and customerid as the Field.
 
Check the Add corresponding relationship checkbox to automatically add the relationship based on the join.
 
plus
 
Click the Add button to create the join.
 
Close the Add Data Entities panel.
 
Click the Continue button to move to the next step, Configure KPI Collections.