Sunteți pe pagina 1din 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

Using the IBM dashDB Cloud Data


Warehouse Service to Analyze Data
Hands on Lab

1 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

Table of Contents
Lab 1: Using the IBM dashDB Cloud Data Warehouse Service to analyze data .......... 3
1.
2.
3.

Creating a Bluemix Application with an Hadoop Service instance .................................................3


Uploading the Medical data to your dashDB service ......................................................................6
Run some Analytics against the Patient Data .................................................................................8

2 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

Lab 1: Using the IBM dashDB Cloud Data Warehouse Service


to analyze data
Lab Objectives: This lab will show you how to use the Cloud based Data Warehouse Service in Bluemix to
analyse large volumes of medical data collected by heart monitors using the massive scalability and inmemory performance offered by dashDB with its wide range of business intelligence toolsets and analytics.
Lab Duration : 30 minutes

1. Creating a Bluemix Application with an Hadoop Service instance



In this section you'll create an Bluemix application with a dashDB service instance that will be used
throughout the rest of the labs
1.

In your browser go to the Bluemix URL http://bluemix.net and login if necessary

2.

Make sure you're in the Dashboard tab (if not click on the Dashboard link at the top of the page
to take you there)

3.

Click on CREATE AN APP within the Cloud Foundry Apps box across the top of the page

4.

Next click on the Web icon to create your web application

3 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

5.

As a starter we will choose Browse samples and click Browse samples

6.

We will select the boiler plate Internet Of the Things Foundation Starter

7.

Choose a name and click create

4 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

Your application should restart, give it a time.


8.

Lets add a new service to the app, from the app overview click on ADD A SERVICE OR API

9.

Scroll down to the Data & Analytics category and click on the icon for the dashDB service.

Give it a service name and then click USE. The application must Restage again.

5 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

2. Uploading the Medical data to your dashDB service


In this section you'll upload the medical data to the instance of the dashDB that you have just created. The
datafile is available at tbc
TOP TIP: To return to the application central/home dashboard then click on the Overview link from the left
side menu.
1.

Click on the dashDB service of your Bluemix application then on the Launch icon to launch the
console of the service instance you just created in another tab.

2.

From the dashDB console click the Load menu from the left side menu and then Load from
Desktop

3.

Select the Browse Files button, navigate to and select the patientdataV5.csv file from the Lab 1
folder on the desktop.

If you dont have or cant find the patientdataV5.csv then please ask your friendly instructor to help.

6 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

4.

Leave all other options as they are and click on the Load File button (lower right). The data file
will be loaded into the dashDB warehouse resulting in something like the below.

5.

Review your heart patient medical data and select the Next button (lower right)

6.

We now need to define the name of the table holding the imported patient information. Select the
Table name field and rename the table patientdata and hit the Finished button (lower right).

7.

You data should have been successfully imported into the patientdata table

8.

Take a note of your dashDB schema name which you will require for the next part of our exercise.
7 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

3. Run some Analytics against the Patient Data



One of the advantages of dashDB is that it also puts analytical capabilities at your fingertips providing users
with enhanced capabilities for analyzing their data. One example is that you can analyze GeoJSON
documents, another is the ability to run R scripts against the data in dashDB and integrating with several
prebuilt in-database analytics functions.
In this final section of the hands on lab you we will provide you with a very basic R script which you will run
against the patient data to visualize the heart failure information.
1.

From the dashDB console select Analytics from the left side menu and then the option R Scripts.

2.

Select the Import button and then the Import from local file system option.

3.

In the dialog box that appears click on the Choose File button, navigate to and select the
piechart.r script located within the Lab 1 folder and select the OK button.

8 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

If you dont have or cant find the piechart.r script then please ask your friendly instructor to help.
Your screen should look something like the below:

4.

What you see here is the content of the R script that is going to produce a visualization of the
patient heart data. However prior to running this script we need to change one element.

5.

At the end of the previous section you noted the name of your automatically generated dashDB
schema name. Goto the R script and change the DASH013335 value to that of your schema as
shown below.

9 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

6.

Now run the script by clicking on the blue Submit button

The R Script will now run and all being well, with no errors resulting in a pdf document icon appearing as shown below:

7.

This pdf document is the output of the script containing the pie chart for the patient heart data.
Single click on pdf document icon to view the results of the script.

The pie chart shows the number of heart patients, from the patient data, who have already suffered heart
10 / 11

Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data

failures. A simple example but illustrates the process required to run R analytics against data stored in your
dashDB warehouse.

Congratulations!
Youve successfully completed Lab 1 where you explored the dashDB warehouse service and how to run
some simple analytics in R to discover how many patients have suffered from heart failure.

11 / 11

S-ar putea să vă placă și