Integration between IBM Cognos Analytics and Jupyter Notebook

As we have seen in previous occasions, IBM Cognos Analytics continues to improve in terms of visualization and self-service tools. With the recent versions, it has been incorporating explorations (which consist of finding relationships between the data that at first glance one does not distinguish by suggesting visualizations to do so) and has also greatly improved the visualizations. However, sometimes for the task of a data scientist, who needs more freedom for data exploration, it is not enough. Until now, it happened that data scientists worked with their own tools and then, somehow, dumped the results to be able to use them in the analyzes. This generates information silos that may or may not be shared and fed back.

With the incorporation of Jupyter Notebooks into Cognos Analytics, we can create, document and share the explorations on the same platform. It is a plus for data scientists when it comes to carrying out their tasks, with the advantage that the results obtained can be easily incorporated into existing Cognos Analytics tools.

This time, we will focus on the integration between IBM Cognos Analytics and Jupyter Notebook. For those who do not know, Jupyter Notebook is a web application that allows you to create and share documents that contain, for example, code (in our case, Python), equations, visualizations and narrative text. It is included, within uses and what interests us most: cleaning and data transformation, numerical simulations, statistical modeling, data visualization and machine learning, among other things.

This integration is available since version 11.1.2 of IBM Cognos Analytics and we have done it in its latest version, 11.1.5.

Steps and requirements to follow for integration

In order to carry out the integration, we need to have a server for Jupyter Notebook, which may be the same one on which we have Cognos Analytics installed or a different one. The supported platforms for the Jupyter Notebook server can be Linux (CentOS, Ubuntu or Red Hat Enterprise Linux) or Windows 10. The important thing here is that, whatever platform you choose for this server you must have Docker installed.

In our case, the integration that we did was IBM Cognos Analytics in a Windows Server 2012 R2 with Jupyter Notebooks Server in CentOS7 with ocker CE (Community Edition).

On the server side of Jupyter Notebooks we need to download the corresponding installer to the IBM Cognos Analytics for Jupyter Notebook Server from the Passport Advantage page and run it. This will copy the files and scripts to be executed in a directory to install the Docker container and start it as a Jupyter Notebooks server. This container will allow IBM Cognos Analytics users to create and edit Notebooks within the same environment in which they can create dashboards, stories, reports, etc.

By default, the container is configured with the most common Python packages to perform Data Science / Analytics, but it is also possible to update or install the necessary packages.
However, after having the Jupyter Server container installed and started, it only remains to configure the access from Cognos Analytics and, for this, it is enough to grant the corresponding users the permissions on the functions of Notebook (Capabilities) in Cognos Analytics and enable the connection between it and the IBM Cognos Analytics for Jupyter Notebook Server.

This consists of browsing Cognos Analytics through: Manage -> Configuration -> System -> Environment and setting the server URL of Jupyter Notebook. By default the port is 8000. As seen in the following example: http://jupyter.quanam.com:8000

Integration between IBM Cognos Analytics and Jupyter Notebook

Now, yes! By doing all of this, we are finally able to see in practice how the integration between IBM Cognos Analytics and Jupyter Notebook is.

The first thing we see is that when we want to create new content in Cognos Analytics we have the option New -> Notebook.

Integration between IBM Cognos Analytics and Jupyter Notebook

And the Notebook tool opens in a new tab within Cognos Analytics.

Integration between IBM Cognos Analytics and Jupyter Notebook

And as you can see, in the menu on the left, we can browse through the data sources in the same way as we do in the other tools of the platform.

Benefits of integration between IBM Cognos Analytics and Jupyter Notebook

As a product of the integration, we will have new features available in the Notebooks. Here we detail some of them:

  1. Create and update Notebooks (create, edit, copy, move and also upload a notebook created outside Cognos).
  2. Execute and work with Cognos data in a Notebook.

Cognos has a connector that through an API allows us to read and write data in Cognos.
A) It can be read from the following sources:
i. Files uploaded in CSV or XLS format.
ii. Datasets
iii. Data Modules
iv. Framework Manager packages, including OLAP data.
B) You can save generated content in a Notebook and make it available as a new data source in Cognos, this allows you to use it as any file uploaded to the platform.

3. Include notebook outputs on dashboards, stories, or reports.

In the next article, we will see some examples of the integration between Cognos Analytics and Jupyter Notebooks.

Marcelo Celio
Computing Engineer / Data & Analytics consultant

 

Leave a Reply

Your email address will not be published. Required fields are marked *