IBM Cloud tutorial for beginners. IBM cloud platform offers computing…
By: Techno Tips
Tags: IBM, Dashboard, Db2, Ibm Cloud, Ibm Watson

IBM cloud platform offers computing services as platform-as-a-service (PaaS) and unlike other vendors, it offers a Lite plan where you can start using the services right away, without using your credit card!.

In this tutorial, we are going to enable and configure three services and you should see how they interact with each other:

Db2 is a relational database designed to store and manage data efficiently.

is a relational database designed to store and manage data efficiently. IBM Watson Studio is a platform specially designed to empower AI projects.

is a platform specially designed to empower AI projects. IBM Cognos Dashboard Embedded is an API-based solution that allows adding visualization capabilities to their applications.

For this tutorial, we are going to upload a spreadsheet into a Db2 database and then visualize it into a Cognos Dashboard in the Watson Studio.

Prerequisites

To follow this tutorial is required that you create an IBM Cloud account. Go to https://cloud.ibm.com and provide an appropriate email and password.

Load the data set to the Db2 database

In the console click on Catalog in the upper toolbar. Here we can explore all the services options on the platform. Select the Db2 database service.

Select a region where the service is provisioned, and a pricing plan which is the Lite plan for this tutorial.

On configure your resource section, specify a Service name, resource group, Tags, and Email. Click the Create button on the right panel. Keep in mind that you only can have one Db2 service active in the free plan. Therefore it might appear a warning like in the image below because I’ve already had one Db2 service.

You can go to Resource List in the left panel to check the new service under the Services option. Click the service name of the database.

Click the Service credentials option in the left panel. Here we will create the credentials to connect to the database. Click the New credential button on the right. In the popup window, you can define a Name, Role, and Advance options. Click the Add button.

You can see the service credentials created. You can display the information by selecting the arrow icon next to the service name or copy the details with the copy icon.

Click the Manage link and then click the Open Console button. This action opens a new console for the Db2 database, later on, we will go back to the IBM cloud console.

Load a CSV file to the Db2 database

You can see all the Schemas available for the Db2 instance. Click the button in the upper left corner and click on LOAD>Load Data

You can select different sources like Amazon S3 or Cloud Object Storage. In this case, click on My Computer to upload a CSV file. The name of the selected file is visible on the right. Click the Next button.

Select the schema and the table or create ones. For this tutorial, we created a new table called general_election. Click the Create button.

In the Define step, we can see the preview of the data, the columns, and the datatypes. Click the Next button.

Review the settings and click the Begin Load button.

Then, check the rows read, loaded, and rejected and observe the warnings generated during the process. To visualize the data uploaded click the View Table button.

Create IBM Cognos Dashboard in IBM Watson Studio

Enable IBM Cognos Dashboard Embedded service

Now we have our dataset in the database and we are ready to use it in the Cognos dashboard. First, we have to add the IBM Cognos Dashboard Embedded service to our IBM cloud account. Go back to the IBM cloud console and click the Catalog menu. In the left panel select Analytics and click the IBM Cognos Dashboard Embedded service. Again, select a Region, Pricing plan, and Configure your resource.

You can see the service Active.

Enable Watson Studio service

Now we have to enable Watson service to create the Dashboard. Go to the Catalog menu and select Watson Studio service.

Again, specify a Region, Pricing plan, and Configure your resource. Click the Create button on the right panel.

You can see the service Active. Click the Get Started button to open the Watson Studio console.

Create a new project on IBM Watson Studio

On the Watson console click the button on the upper left corner to create a new project.

Select the Projects tab and click the New project button on the main panel.

Click on Create an empty project section.

Specify a Name, Description, and click the Add option to define an object storage instance.

Click the Create button to create the Cloud Object Storage service. Observe that in this case unlike the other services Region is Global.

Once Storage is created, the Create button is enabled. Click the Create button to create the project.

Associate a service to the project

Now we have to associate Cognos Dashboard Embedded service to the project. Click the Settings tab in the upper bar.

Scroll down to the Associated services section. Click the Add service option and select the Dashboard option.

Select the IBM Cognos Dashboard Embedded service and click the Associate service option.

Add a Dashboard to the project

Now we can add a Dashboard to the project using the service associated previously. Click Add to project menu on the upper bar.

Select Dashboard from the list of asset types.

Specify the Name, Description, and Cognos Dashboard Embedded service. Click the Create button.

Once we created our Dashboard, we can choose the desired layout. Click the Ok button to continue. This action redirects to the select sources page, but first, we need to add the data source to the project.

Add a Connection to the project

Before loading the data source to the Dashboard, we need to add a Connected data asset type to the project. Click Add to project menu on the upper bar again, but this time select Connected data.

Click the Add connection option.

Now we can associate our Db2 database service instance. Click the appropriate database service name.

Automatically, the system detects the Connection details like Database, Hostname, Port, Username, and Password. Click the Create button.

Now we can see the database connection in the Assets tab of the project.

Add a source to the dashboard

Click the dashboard name and click the + option to add the data source.

Select the Connection, Schema, and appropriate Table. Click the Select button.

Now you can visualize the columns and discover meaningful insights into your data. For example, in this tutorial when we drag and drop State and Total_Ballots fields, Cognos automatically detects that State is a geographic location and it opens up a map for our report.

Also, it provides an easy way to add filters just by dragging the appropriate field.

Conclusions

IBM cloud platform has a broad portfolio of computing services from infrastructure, databases, developer tools, analytics to cutting-edge technologies like AI/Machine learning, blockchain, or IoT.

For exploring or training purposes it is available a free tier called Lite Plan where you can set up the services in a matter of minutes and you do not have to enter a credit card number to use them. However, for enterprise requirements, it is important to upgrade your Lite account to a Pay-As-You-Go account or Subscription account to have access to the full IBM catalog of services and to have direct access to cloud support.