Knowage – Monitor business objectives with KPI documents

A Key Performance Indicator is an index, consisting of one or more metrics, that can be used to monitor how effectively a company is achieving key business objectives. In this AIKnow.info Blog article, we will see how Knowage can be used to create  KPI documents (Fig.1)


Fig.1 A KPI document

The first step is to define a new measure/rule; this can be done from Kpi Model – Measure/Rule Definition menu. Clicking on the plus icon will opens the interface in Fig.2 where it’s possible to define the query.

This example suppose that the measure of interest is the number of product made in a production line, and that this number is inserted in a table every hour (Fig.3).


Fig.2 New Measure interface

Fig.3 table content

In Metadata tab it’s possible to define a typology and a category for every value selected by the query, while the Preview tab allows to check the result of configurations.

KPI can be defined from KPI Model-KPI Definition menu. The add button opens the interface in Fig. 4. Using CTRL key and space bar the system displays all measure defined.


Fig.4 KPI Definition Menu

Once the measure is choosen, clicking on it the function for that value can be selected (Fig.5). In our example we will control the minimum value assumed from the number of product made by product line. Clearly the formula can be more complex involving various measures and operators.


Fig.5 Function selection to apply to the measure

The Cardinality tab allows you to define the grouping level for the attributes of the defined measures.

Limit values can be set using the Threshold tab (Fig.6)  where specify label, minimum and maximum values and associated colors.


Fig.6 Limit value definition

The last step is to define a new Scheduler. In KPI Model-KPI Scheduler Menu, using add icon opens Fig.7 interface where in KPI tab, it can be added a KPI Association (Fig.8)


Fig.7 New Scheduler interface


Fig.8 KPI Association

In Frequency tab, can be defined start and end date and the periodicity of execution.


Fig.9 New Scheduler interface

Now a new Document can be created to view the KPI. In Fig. 10 you can see the basic configuration.


Fig.10 New KPI Document interface

In Fig.11 you can see the template build interface where it’s possible to define various configurations.


Fig.11 KPI Document designer

The result is visible in Fig.12

Fig.12 KPI Document

Knowage – OLAP Analysis

Onlyne Analytical Processing (OLAP) means analyze big amount of data, in real-time, with fast response time, to allow high interactivity. This is usually guaranteed by a pivot table: in Fig.1 you can see the Knowage OLAP Document that contains a pivot table as the main part.

In this AIKnow.info blog article we will see how to develop an OLAP document with Knowage, starting from the dataset described in the article Knowage – query databases in a visual way with QBE.


Fig.1 Knowage OLAP Document

OLAP employs Multidimensional Analysis. Whereas a relational database stores all data in the form of rows and columns, a multidimensional dataset, in short a cube, consists of dimensions, hierarchies and measures.

The first step to create an OLAP analytical document with Knowage is to write a new Schema with Mondrian. Mondrian is a ROLAP tool: it maps OLAP structures, such as cubes, dimensions and attributes directly on tables and columns of a relational data base via XML-based files. More information on this tool can be found at https://mondrian.pentaho.com/.

First it’s necessary to create a star schema, that consists on a table of fact that references two or more table of dimensions as depicted in Fig.2


Fig.2 Star schema

From the data in the table “0054_consumo_energia” (see article Knowage – query databases in a visual way with QBE Fig.3), it’s possible to generate a star schema where the fact is power consumption. The fact table (Fig.3) contains the power consumption data (column “dato”), the foreign keys “territorio” to Cities dimension table (Fig.4) and “anno” to Time dimension table (Fig.5).

Fig. 3 Fact Table

Fig.4 Cities dimension table


Fig.5 Time dimension table

With the star schema ready, it’s possible to create Mondrian schema. In few words a Mondrian schema is an XML file where dimensions and cube features are specified. In Fig.6 you can see in detail the XML file. The interpretation is quite simple, anyway more details about writing the schema can be found here https://mondrian.pentaho.com/documentation/schema.php


Fig.6 Mondrian schema

Once written, schema can be uploaded in Knowage using Catalogs-Mondrian schemas catalog Menu (Fig.7)


Fig.7 Mondrian schema upload

Now the Document can be created using Document Browser – New document – Generic Document Menu (Fig.8). Label and Name field are mandatory, Type must be set to On-line analytical processing, Engine to OLAP Engine, Data Source to the one in use (in my case Data Set name is MySQL). Then it’s necessary to specify the folder for the document using the tree in the right side of the page.


Fig.8 New Document Creation

Clicking on Template build icon opens the OLAP designer (Fig.8), where it’s necessary to choose the Type of Template (Mondrian), the Mondrian Schema (see Fig.6) and the Cube (see Fig.5).


Fig.9 OLAP Designer

Clicking Start on the right upper corner opens the Document (Fig.10), whose central part is the pivot table that can  be used to analyze data.

Axes panel can be used to place hierarchies (represented with filter card) on columns or rows axis, position them in a particular order, swap axes.

Clicking on the icon positioned on the top right side of the page you can open the side bar that allows to choose between different data representations and different drill types.

Fig.10 OLAP Document

Knowage – Create Data Reports with BIRT

Reports can be helpful when data have to be exported periodically in a specific format, even following a predefined template, to monitor processes and support their management.

With Knowage Report Designer Tool, available at https://download.forge.ow2.org/knowage/, it’s possible to create and publish reports to Knowage Server. In this AIKnow.info Blog article, that follows the one on Cockpit, we will see how to create a Report using BIRT, an open source platform used to create data visualization and reports http://www.eclipse.org/birt/.

Once downloaded and installed, Knowage Report Designer Tool can be connected to Knowage Server, giving the possibility to download and deploy Reports.

The first step is to open Knowage Report Designer Tool, create a new project (from File-New-Knowage Project menu or through Knowage icon) and add a new server (right-click on Resources – Server icon), see Fig. 1.

Fig.1 Create a new project and add a new server

Note that in the New Server configuration, you have to choose at least one Active server (Fig.2)

Fig.2 New server configuration and test

Now we can create a new Report, right clicking on Business Analysis folder icon and choosing Report-Report with Birt command (Fig.3)


Fig.3 New Report with Birt

Once created, the report can be designed double clicking on it and opening the Report Designer Perspective (Fig.4 and 5)

Fig.4 Changing perspective to Report Design

Fig.5 Report Design perspective

The first step is to create a new Data Source. This can be done right clicking on the specific icon in Fig.5. It opens a wizard (Fig. 6) where, choosing Knowage Server Data source from the list, it’s possible to retrieve Data Sets already defined in Knowage.

Fig.6 Create a New Knowage Server Data Source

Fig.7 Data source configuration

Once defined the Data Source, a new Data Set can be created right clicking on the specific icon of Report Design Perspective (Fig.5). First it’s necessary to give a name to the Data Set (Fig.8), then to specify a label (Fig.9). In this step it’s mandatory to specify the same label used for the Data Set in Knowage.

Fig.8 New Data Set wizard

Fig.9 Data Set wizard

It’s then possible to further configure Data Set (Fig.10)

Fig.10 Data Set configuration

Once Data Set is available, Report generation can be as simple as dragging it on working area and choosing the visible columns (Fig.11 and 12). Clearly report features can be modified from Property Editor interface (Fig.13).

Fig.11 Report generation

Fig.12 Report generation


Fig. 13 Property editor interface

At this point we can test the report, right clicking on it and choosing Report – Run Report command (Fig.14).

The command opens the default web browser and, if all is working well, you will see the report created (Fig.15).

Fig.14 Test report with Run Report command

Fig.15 Report preview

Now coming back to Knowage perspective, it’s possible to deploy the report to the server, right clicking on it and choosing Deploy icon (Fig.16). The command opens a Wizard where it’s necessary to specifiy Label, Name, Description and DataSource (Fig.17).

Fig. 16 Deploy report


Fig.17 Report deployment wizard

Once Deployed, you can find the report in Knowage, opening Document Browser (Fig.18).


Fig.18 Knowage Document Browser

Clicking on the play icon, the report will be generated, and could be exported in one of the available format (Fig.19)


Fig.19 Report generation and export

 

Knowage – Monitor data with Cockpit

In this AIKnow.info Blog article, that follows the one on Knowage Query by Example, we will see how to use Knowage to create Cockpits to monitor data trends. We will create an example where, starting from resident population data, it will be possible to see the evolution of this value by year for a specific city. Clearly this example can be translated into other areas, for example those connected to business metrics.


Fig.1 Knowage Cockpit to monitor resident population for city and year

First of all we need a Data Set, with the information of interest. We can create one from Data Providers – Data Set Menu (Fig.2).


Fig. 2 – Data Set creation

 From Data Set definition interface, using pencil icon, it’s then necessary to define if a field is an Attribute or a Measure (Fig.3).


Fig. 3 Field metadata definition

For user profilation purposes, it’s useful to define a specific Category for the Data Set (in this example Dati_Italia). This can be done from Server Settings – Domain Management Menu (Fig.4).


Fig. 4 New Category type definition

Once defined, the category can be added to a specific role using Profile Management – Roles Management Menu (Fig.5)


Fig. 5 Category association to a role

From Data Set interface, selecting TYPE Tab, it’s possible to define data set features (Fig.6) and have a preview of the Data Set created (Fig.7).


Fig.6 Data Set features definition


Fig.7 Data Set preview

Now, logging to Knowage like a user, in the Analysis area under the Workspace menu item, it’s possible to click on the Create Analysis icon and choose Cockpits.

This will open a blank page that can be edited using tools available in the sandwich icon menu.

Fig.8 Cockpit menu

The Add Widget icon opens the interface in Fig. 9 where it’s possible to choose the elements to add to the cockpit.


Fig.9 Cockpit widget

In our example we will add a table and a chart. In Fig. 10 you can see the interface to configure the Table Widget. This is made by 4 tabs where it’s possible to define colums, style, cross navigation and filters behavior.


Fig.10 Table widget configuration interface

In Fig.11 you can see the interface to configure the chart widget. This is made by 5 tabs where it’s possible to configure Dataset, design Chart with a specific engine, and define style, cross navigation and filters behaviour.


Fig.11 Chart widget configuration interface

The Chart Engine Designer allows to choose chart style (Fig.11), Chart structure (Fig.12) made by Categories  (x axis) and Series (y axis). Note that for Categories you have to choose an attribute, while for Series a measure (Fig.3).


Fig.12 Chart widget configuration interface

In Fig.13 you can see the result of the above steps: a table containing all the records selected from the dataset and a chart representing by year the sum of the measure called “Dato”


Fig.13 Cockpit resulting from the above configuration

One interesting Knowage function is the one represented in Fig.14 where, choosing a city and double clicking on “Territorio” column, table data are filtered for this attribute and chart content is consequently updated.


Fig.14 Cockpit resulting once selected a city

City selection can be modified from selection list widget (Fig.15).


Fig.15 Selection list widget

Knowage – query databases in a visual way with QBE (Query By Example)

Knowage (www.knowage-suite.com) is an open source Business Intelligence suite, that descends from well known SpagoBI.

In this AIKnow.info Blog article,  we will see how to create a QBE (Query By Example), very useful when you want to allow end users the possibility to query databases in a visual way, i.e. without using interrogation languages like SQL.

In the following image (Fig.1) you can see QBE interface. Tables regarding facts are available in the left side, and can be analyzed dragging and dropping the attributes of interest in the central panel, where you can order them, group them, filter the resulting informations using various principles and so on.

Fig.1 Knowage QBE

Now we will see the procedure to obtain the above result. Let’s assume that you have Knowage installed, and that you can use a dedicated data base schema. Even if the data of your interest are already in a data base, it’s always a good idea to work in a separate schema to avoid interferences between operational informative systems and business intelligence ones. In this way you can also manage better the so called ETL (Extract, Transform and Load) processes: an essential part of a business intelligence system.

For this example I’ve downloaded some data sets from dati.italiaitalie.it open data portal. I’ve loaded them in a MySQL shema using the Import Wizard utility available in Toad for MySQL tool (Fig.2).


Fig.2 Toad for MySQL Import Wizard

As a result I’ve in MySQL 7 tables regarding some facts of interest: resident population absolute and relative, energy consumption, bank deposits, available income, bank use total, home theft. These tables can be joined by means of two fields: Territory and Year.

Fig.3 data loaded in My SQL

Now we can open Knowage and start the configurations needed to build the QBE.
The first step is to define a new Data Source. You can do it logging to Knowage as administrator and using Data Providers menu section. In Fig. 4 you can find the configuration for MySQL DB.


Fig.4 Data source configuration

The second step is to define the Business Model: this is possible accessing the Menu Catalogs – Business Models catalog, and giving some information (Fig.5). In order to easily profile user access to data, it’s important to define a custom category (ITALIA) for the Business Model. This can be done from Menu Server Settings – Domain management (Fig.6)


Fig. 5 New Business model interface


Fig. 6 New Business Model category definition

Once given the informations requested in Fig.5, clicking on save enables the metamodel creation button. The first step to define the metamodel is to choose the tables to include, from the list coming from the datasource (Fig.7).


Fig.7 Selection of tables from datasource

Clicking on continue it’s possible to edit the Business Model. It’s important to define for every table the key to use (Fig.8) and the relationships between tables (Fig.9)


Fig.8 Selection of keys from tables


Fig.9 Relationship definition

Once all relationships are created, coming back to Catalogs – Business models catalog,  and selecting the one just created, it’s available the new button GENERATE (Fig.10 and 11) that allow the creation of the datamart needed to query the metamodel from the Workspace interface.


Fig.10 Business Model creation interface with GENERATE button available


Fig.11 Dialog box to confirm datamart creation

For a user to work with the metamodel just created, it’s necessary to give him the related permissions. This can be done accessing Profile Management – Role Management menu and allowing the business model category ITALIA to the role you want (Fig.12). If the role or user is not already present, you can add it from Roles Management or Users Management menu in Profile Management section.


Fig.12 Adding ITALIA category to the role user

Now, logging in Knowage with the user with the right profile, you can find the metamodel in Data-Models section (Fig.13).


Fig.13 user workspace with metamodel available

Clicking on magnify icon will open QBE interface (Fig.14). In the left column you can find available tables, and for each one available attributes. You can select those of your interest dragging and dropping them in Query Editor window. Here you can define various properties to apply to the attribute (Alias, Ordering etc.) and the filters your need.


Fig.14 QBE interface

When you’re sure about the attribute and the related properties, it’s possible to see a preview of the report (Fig. 15) using the command at the top right of Query editor panel. This can be saved for later use with the floppy disk icon.


Fig.15 Report Preview