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 Customers, Orders, Order Details Extended and Products.
The Configure Data Entities panel will appear.
Click the green plus sign, ,on the upper right hand corner of the Configure Data Entities panel, and the Add Data Entities panel will appear:
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, , 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.
From the Available Tables/Views drop down begin by selecting the public.customers table.
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.
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.
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, , in the upper right and corner of the Configure Data Entities dialog.
Creating joins and relationships
Click on the plus button, , 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:
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.
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.
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.
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.