Cognos 11 is not only positioned toward the professional report author, but specifically toward power users and data scientists by offering Watson-like features such as natural language search and automatic proposal of charts. With all the latest features including custom control, interacting or communicating with cloud hosted services is also possible from the Cognos application.
If there’s a need to see a real-time machine learning model output from Cognos Dashboard, then we need to have an external mechanism to invoke the model, pass the parameters, and get the scores written back to the database. Cognos reads the latest scores from the database and displays them on the dashboard. This can be a tedious process of displaying the machine learning model outputs and is not real time.
This code pattern explains how to invoke the Watson Machine Learning model hosted on IBM cloud from the IBM Cognos dashboard. Some Cognos users get the requirements to dynamically get scores/prediction results of the ml models from within the Cognos console. However, with older versions of Cognos applications, we don’t have a straight forward solution or option to invoke these models directly. Now, however, with the latest versions of the release (for demo purposes we used cognos 11.0.11), we can use a custom widget built using Java scripts/D3 charts to invoke models hosted on the cloud platform. This helps enable you to get insight from the Cognos dashboard, and also include another tab or a dashboard within the same application to input the model required parameters and get instant predicted outputs.
After you have completed this code pattern, you’ll understand how to:
- Create a real time dashboard using Cognos custom control.
- Invoke machine learning models hosted on cloud through REST API from Cognos.
- Create Watson Machine Learning Model and deploy as web service.
- Launch Cognos on web browser.
- Create the Cognos report using Custom Control and run the report.
- Report invokes WML model based on the input parameters.
- Gets output from the WML model and displays on the Cognos dashboard. Dashboard gets updated with real time WML model output.
Get the detailed instructions in the README file. These steps will show you how to:
- Create and deploy the Watson Machine Learning model from Watson Studio.
- Get the WML Credentials and model API code.
- Host the WML model through the node application.
- Create custom control widgets.
- Build the Cognos report and import the custom control widget.
- Run the report and analyze the results.