IBM BigInsights BigSheets Course Guide
IBM BigInsights BigSheets Course Guide
Course Guide
IBM BigInsights BigSheets v4.0
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
IBM Training
Preface
August 2015
NOTICES
This information was developed for products and services offered in the USA.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for
information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to
state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not
infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any
non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
United States of America
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in
certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these
changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the
program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an endorsement of
those websites. The materials at those websites are not part of the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information
concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available
sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the
examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and
addresses used by an actual business enterprise is entirely coincidental.
TRADEMARKS
IBM, the IBM logo, [Link] and BigInsights are trademarks or registered trademarks of International Business Machines Corp., registered in many
jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is
available on the web at “Copyright and trademark information” at [Link]/legal/[Link].
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
© Copyright International Business Machines Corporation 2015.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Contents
Preface................................................................................................................. P-1
Contents ............................................................................................................. P-3
Course overview................................................................................................. P-6
Document conventions ....................................................................................... P-7
Additional training resources .............................................................................. P-8
IBM product help ................................................................................................ P-9
Using BigSheets for data analysis....................................................... 1-1
Unit objectives .................................................................................................... 1-3
What is BigSheets? ............................................................................................ 1-4
Big Data challenges for business analysts ......................................................... 1-5
What can you do with BigSheets? ...................................................................... 1-6
Processing scenario example ............................................................................. 1-7
BigSheets runtime processing ............................................................................ 1-8
Accessing BigSheets .......................................................................................... 1-9
Working with BigSheets.................................................................................... 1-10
Checkpoint ....................................................................................................... 1-11
Checkpoint solutions ........................................................................................ 1-12
Demonstration 1: Getting started with the lab environment............................... 1-13
Unit summary ................................................................................................... 1-18
Unit 2 Making data available to BigSheets..................................................... 2-1
Unit objectives .................................................................................................... 2-3
Create a master workbook from HDFS ............................................................... 2-4
BigSheets readers .............................................................................................. 2-5
Running a workbook ........................................................................................... 2-6
Updating the data in a workbook ........................................................................ 2-7
Workbook lineage............................................................................................... 2-8
Workflow Diagram .............................................................................................. 2-9
BigSheets breadcrumbs ................................................................................... 2-10
Import and export a workbook .......................................................................... 2-11
Checkpoint ....................................................................................................... 2-12
Checkpoint solutions ........................................................................................ 2-13
Demonstration 1: Importing data into a workbook ............................................. 2-14
Unit summary ................................................................................................... 2-19
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Course overview
Preface overview
This course is designed to introduce the student to the capabilities of BigSheets.
BigSheets is a component of IBM BigInsights through the Analyst and the Data
Scientist module. It provides the analyst the ability to be able to visualize and
analyze data stored on the HDFS using a spreadsheet type interface without any
programming.
Intended audience
The course is designed for business analysts that does not want to deal with any
coding to get insight on their data.
Topics covered
Topics covered in this course include:
IBM BigInsights BigSheets:
• Using BigSheets for data analysis
• Making data available to BigSheets
• Navigating a Workbook
• Discovering data with expressions, functions, and formulas
• Integrating with Big SQL
• Visualizing data with Big SQL
Course prerequisites
Participants should have:
• Students should be familiar with Hadoop and the Linux file system.
• Although not required, it would also be helpful for students to take the
DW613 - IBM BigInsights Overview course to have a better understanding of
how BigSheets fit into everything.
• Students can attend many free courses at [Link] to
acquire the necessary requirements.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Document conventions
Conventions used in this guide follow Microsoft Windows application standards, where
applicable. As well, the following conventions are observed:
• Bold: Bold style is used in demonstration and exercise step-by-step solutions to
indicate a user interface element that is actively selected or text that must be
typed by the participant.
• Italic: Used to reference book titles.
• CAPITALIZATION: All file names, table names, column names, and folder names
appear in this guide exactly as they appear in the application.
To keep capitalization consistent with this guide, type text exactly as shown.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Task- You are working in the product and IBM Product - Help link
oriented you need specific task-oriented help.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
U n i t 1 U s i n g B i g S h e e t s f o r d a t a a n a l ys i s
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit objectives
• Identify business and technical challenges in dealing with big data
• Describe how BigSheets can help with the business and technical
challenges of big data
• Access BigSheets from the BigInsights Home console
Unit objectives
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
What is BigSheets?
• Browser-based analytics tool for business users
• Spreadsheet like interface for analyzing big data
• A component of IBM BigInsights
What is BigSheets?
BigSheets is a browser-based analytic tool designed to work with Big Data. Unlike
like many other Big Data tools, it is designed to support business users and non-
technical professionals. To do so, it presents a familiar, spreadsheet-like interface
that allows users to gather, filter, combine, explore, and visualize data from various
sources.
IBM chose the spreadsheet as the model for organizing data because most users
are already familiar with such software. If users want to represent the data in more
complex ways,.
As an important part of IBM’s Big Data strategy, BigSheets is a feature of IBM
BigInsights
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
No programming
knowledge needed!
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
BigInsights
Engine
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Full Execution
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Accessing BigSheets
• Ensure BigInsights is running.
• Log in to the Ambari Console
• Start the Demo LDAP server via the Knox service.
• Launch the BigInsights Home console with the URL
‒ [Link]
BigInsightsWeb/[Link]
‒ Sample URL:
‒ [Link]
[Link]
• Click the BigSheets icon to launch BigSheets it a new browser tab
Accessing BigSheets
To begin, make sure the BigInsights has been started. Log in to the Ambari console
to start up the Demo LDAP server. This is required to start up the BigInsights Home
where you will access BigSheets. The knox_host would be where BigInsights was
installed. The default port is 8443. A sample url is provided. Once on the BigInsights
Home page, click on BigSheets to launch it.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint
1. Where can you get BigSheets?
2. True or False? BigSheets executes work on a simulated
environment of sample data.
3. List the four steps to work with BigSheets.
Checkpoint
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint solutions
1. BigSheets is a component of IBM BigInsights
2. True, BigSheets first runs against a sample set of data. Once you are
ready, you will need to run the work on the full data set.
3. Four steps to work with BigSheets:
1. Create a workbook from the data
2. Customize worksheet with formulas and built-in functions
3. Run the workbook on the full data set
4. Analyze results and / or create visualization diagrams
Checkpoint solutions
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1
Get started with the lab environment.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1:
Getting started with the lab environment
Purpose:
You will start up the BigSheets service, access BigSheets via BigInsights
home page and locate and upload lab files you will be using in the
demonstration.
User/Password: biadmin/biadmin
Root/dalvm3
Service Password: ibm2blue
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit summary
• Identify business and technical challenges in dealing with big data
• Describe how BigSheets can help with the business and technical
challenges of big data
• Access BigSheets from the BigInsights Home console
Unit summary
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit 2 Making data available to BigSheets
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit objectives
• Define the term workbook when used in conjunction with BigSheets
• List the readers supplied with BigSheets
• Describe the different ways to get data into a master workbook
• Explain the concept of running a workbook
• Import and export a workbook
Unit objectives
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
BigSheets readers
• Select the reader based upon the
data's format
Basic Crawler Data
Character Delimited Data
Comma Separated Value (CSV)
− Can allow for a header record
Hive Reader
JavaScript Object Notation (JSON)
− Both array and object reader
Tab Separated Value
− Can allow for a header record
Sheets Data
Line (default)
• User-written plug-ins are supported
BigSheets readers
In order for the data in a workbook to be parsed properly, the correct reader must be
used. IBM supplies a number of different readers and user-written plug-ins are also
supported. The supplied readers are:
Comma Separated Value - This also allows for a header record to be part of the file
Tab Separated Value - This also allows for a header record to be part of the file
Character Separated Value - This also allows for a header record to be part of the
file. You must also specify the character that is used as the separator
JSON Array or Object Reader – This reader reads a JSON file that contains a JSON
array of JSON objects.
Basic Crawler - This is used to view the results from a web crawler
Hive – reads from the Hive default field separator output file
Line - This is the default reader
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Running a workbook
Indications of the status of
workbooks
Running a workbook
As stated before, BigSheets is designed to work on a subset of the data during the
creation phase of a workbook. After the workbook has been test and is known to run
properly on the subset of data, a run function can be executed so that the processes
in the workbook are applied to the entire data set.
When viewing the list of workbooks, the status of each workbook is displayed in the
form of a progress indicator which gives a visual indication as to whether a
workbook needs to be run on the entire data set.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook lineage
• When a workbook is built from an existing workbook
The original workbook becomes the parent
The newly created workbook becomes the child
− All child workbooks based on a single parent are sibling workbooks
Build a workbook from an
existing workbook
workbook lineage
Making data available to BigSheets © Copyright IBM Corporation 2015
Workbook lineage
Additional workbooks can be built based upon existing workbooks. When a
workbook is built from an existing workbook, a lineage is created. The original
workbook becomes the parent and the newly created workbook becomes a child. All
workbooks that have the same parent workbook are sibling workbooks.
Why have workbooks that are based on other workbooks? This allows for
implementing incremental analysis. Small manipulations of the data are made so
that the effect of each of those manipulations can be easily observed. This simplifies
the analytics but also can create a documentation nightmare.
Assume that you have created ten workbooks that, in a step by step fashion,
culminate in a workbook in which the data can be easily analyzed. Later someone
looks at your final workbook and wonders how you manipulated the data to get the
results. The lineage capability of BigSheets is a self-documenting mechanism that
gives a person a way of seeing which workbooks were used in the creation of the
final workbook and the order in which they were applied.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workflow Diagram
• Shows the relationship between all the workbooks related to the
current workbook
Workflow Diagram
The Workflow Diagram shows the relationship between the current workbook and all
the workbooks that are related.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
BigSheets breadcrumbs
• Using the breadcrumbs to navigate back up the workflow and to the
home page
BigSheets breadcrumbs
Use the breadcrumb links to go back to parent workbooks or to the BigSheets Home
where you can create new workbooks or perform other workbook options, such as
importing and exporting workbooks.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint
1. How do you create a workbook?
2. What is the purpose of BigSheets readers?
3. True or False? Data in a worksheet is automatically updated when
the source data changes.
4. What allows you to find out if a workbook has a parent?
Checkpoint
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint solutions
1. Click the New Workbook button and specify the data source from
HDFS.
2. BigSheets readers allow a way to parse the data as it is loaded.
CSV, TSV, JSON, Character-delimited, Hive, Line (default).
3. False. The data in the worksheet is static, you need to manually
refresh the data. Open the workbook and click the Refresh
pushbutton.
4. The workbook lineage or the workflow diagram shows a visual
representation of the relationship between the workbooks.
Checkpoint solutions
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1
Import data into a workbook.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1:
Importing data into a workbook
Purpose:
You will load data into various BigSheets master workbooks.
User/Password: biadmin/biadmin
Root/dalvm3
Service Password: ibm2blue
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
6. Go to the BigInsights Home page in the Firefox browser and click on the
BigSheets link (last step from the previous demonstration) to load the
BigSheets landing page.
You should be here now:
11. Click Edit Workbook reader and then select the Comma Separated
Value (CSV) data.
12. Uncheck the "Headers Included?" checkbox and then click Apply settings
to change the reader type.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit summary
• Define the term workbook when used in conjunction with BigSheets
• List the readers supplied with BigSheets
• Describe the different ways to get data into a master workbook
• Explain the concept of running a workbook
• Import and export a workbook
Unit summary
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Navigating a workbook
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit 3 Navigating a W orkbook
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit objectives
• Create a workbook from a master workbook
• List the different types of sheets that can be added to a workbook
• Describe what each type of sheet can do in a workbook
• Add a sheet to a workbook
Unit objectives
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbooks
• A master workbook
Cannot be edited
− Cannot add new sheets
− Cannot add new columns
Can
− Add charts
− Be exported
− Create a table
− Modify column types
• A child workbook
Can have sheets added to it
Can add, hide, or remove columns from it
Workbooks
When you create a master workbook by importing data from the Hadoop file system,
that workbook is immutable. Columns cannot be modified and no new sheets can
be added. Master workbook can add charts, have its metadata exported, create a
table, and have its column types modified.
Child workbooks, created from an existing workbook can be changed. Sheets can
be added to the new workbook and columns in any of the sheets can be modified. A
child workbook takes on the characteristics of its parents. This means that any
sheets defined in the parent are applied before the data is passed to a child
workbook.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (1 of 9)
• Filter
Removes data that does not match a specified criteria
• Formula
• Allows complex formulae to be specified
Workbook sheets
The Filter sheet allows you to code one or more conditions that causes data to be
removed.
The Formula sheet gives you an entry field where you can code a specific formula.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (2 of 9)
• Function
Executes a function against each
row in a sheet.
Categories of various It is a function that takes rows of
functions
data as input and produces one
or more rows of data as output
The Function sheet executes the specified function against each row in the sheet.
Selecting the Categories hyperlink, presents a list of available function types.
Selecting a function type presents a list of functions. Based upon the chosen
function, you enter parameter values using the provided graphical interface.
There are a number of functions provided by BigInsights but you also have the
option of defining additional functions.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (3 of 9)
• Limit
Limits the number of rows in a
sheet
• Distinct
• Eliminates duplicate rows in a
sheet
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (4 of 9)
• Copy
Copies a sheet, including the
data and all the formulae used
to create the data
• Complement
Creates a sheet from rows of
two or more sheets where the
first sheet contains values in the
specified column that are not in
the other sheets
The Copy sheet makes a copy of another sheet. This includes both the data and all
formulas. You might want to do this because you want to try different techniques
when working with a particular set of data.
The Complement sheet takes two or more sheets as input. A common column is
chosen for all sheets. All rows in the first sheet that do not have the same values in
the chosen column in the other sheets are retained. All sheets must have the exact
same schema.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (5 of 9)
• Intersection
Creates a sheet from two or more sheets consisting of rows where all
sheets have the same values in the specified column
The Intersection sheet creates a new sheet from two or more existing sheets that
contains those rows that have a common value in the chosen column. All sheets
must have the same schema.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (6 of 9)
• Load
Brings in the data of another workbook as a sheet.
Useful in performing a combine, complement, intersection, or union
operation using other sheets
The Load sheet brings in data from another workbook. It is useful in performing a
combine, complement, intersection, or union operation using other sheets. The data,
when imported into to the original workbook, required a particular reader in order for
the data to be properly parsed. When the Load sheet is used, it follows somewhat
the same process as importing the data. A reader needs to be specified to parse the
data properly.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (7 of 9)
• Group
Calculates values by grouping data in the workbook, applying functions to
each group, and carrying over data
The Group sheet calculates values by grouping data in the workbook, possibly
applying a function to each group, and specifying any columns that are to be carried
over from the input sheet.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (8 of 9)
• Join
Joins two or more sheets using a
common column in all of the sheets
The Combine sheet joins two or more sheets using a common column in all of the
sheets.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Workbook sheets (9 of 9)
• Union
Appends sheets
The Union sheet appends sheets into a single sheet. All sheets being unioned must
have the same schema.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Modifying a column
3
2
Modifying a column
Within a child workbook, columns can be added, removed, sorted, and hidden. In
order to populate a newly inserted column, you specify a function. You can also
change the name of a workbook by clicking on the pencil icon next to the name of
the workbook.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Properties of a sheet
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint
1. True or False? A master workbook can be edited to add new sheets
or columns.
2. List at least three different sheets that you can create.
3. What information can you find when you view the properties of a
sheet?
Checkpoint
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint solutions
1. False. You cannot edit the master workbook to add any sheets or
columns. You must first create a child workbook to do that.
2. The types of sheets available: filter, function, load, group, join, union,
intersection, complement, limit, distinct, copy, formula
3. The properties of a sheet tell you formula or function that was used to
created it. You can update that as well as delete or rename the
sheet.
Checkpoint solutions
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1
Adding sheets to a workbook.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1:
Adding sheets to a workbook
Purpose:
You will create a new workbook based on the web crawler notebook and use
sheets to extract data from web pages.
User/Password: biadmin/biadmin
Root/dalvm3
Service Password: ibm2blue
Task 1. Background.
In the previous demonstration you created a workbook based on the results of a
web crawler. The crawler was directed to extract information from a website that
dealt with patents. Essentially the web crawler looked at a site that had a list of
names. Each name is a hyperlink to a page that lists the patents for that person.
1. If you wish, you can review the contents of the website that was crawled.
Launch Firefox, or open up a new tab in the existing browser. If you wish to see
it again, go to the following website:
[Link]
2. There you see the list of names, Click on any name and it takes you to a page
that lists all of the patents registered to that individual. This is to give you a
frame of reference when doing this exercise.
3. You can close the newly opened tab.
Task 2. Create a Function sheet.
1. Go to the BigSheets Home page.
2. Open the PatentCrawler workbook.
PatentCrawler is a master workbook. No modifications can be made to it.
However, you can create a new workbook that is based on PatentCrawer and
this new workbook can be modified.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
5. Keep the default sheet name, click the elements drop down box and then
select NameWithH1Tag.
6. Click the Carry over tab and add content to the carry over list by clicking Add
column to carry over.
7. Click Apply settings.
8. Change the name of column A to PatentOwner.
Task 4. The saga continues.
You will now get all of the patents for each individual.
1. Ensure Sheet2 is selected and then click Add sheet.
2. Select a Function sheet, click Categories and then html.
3. Select HTMLEXTRACTTAGS. (with an S)
HTMEXTRACTTAG lets you specify the occurrence. HTMLEXTRACTTAGS
selects all.
4. Keep the default sheet name.
5. From the Content drop-down, select Content.
6. For tag type H2.
This is the tag associated with the name of each patent for an individual.
7. Click the Carry over tab and then add PatentOwner to the list.
8. Click Apply settings.
Now you have a row for each patent that is associated with each individual. If
you notice, you also removed the blank name and the one called Found.
Ultimately, your goal might be to count the number of patents for each
individual. However, you are going to stop here. The presentation material has
not covered the additional topics that are required to complete that goal. Later,
once you have this additional information, you could come back here and code
the additionally required sheets.
9. Rename your workbook.
11. Change the name to Patent Extract and then click Save tag .
12. Click Save.
13. Select Save & Exit.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
14. At this point you also have the option to rename the collection.
15. Click Save.
Notice that this new workbook has not been run. You have only been working
with a subset of data. In order for your work to be applied to all of the data, you
must run the workbook.
16. Click either one of the Run buttons.
There is a yellow triangle on the left side above the data that indicates that
the workbook has not been run. (There is also a progress indicator on the
right side.) When the processing completes, the triangle changes to a green
checkmark. Also, the percentage complete on the right side goes to 100%.
The results appear as follows:
Results:
You created a new workbook based on the web crawler notebook and used
sheets to extract data from web pages.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit summary
Create a workbook from a master workbook
List the different types of sheets that can be added to a workbook
Describe what each type of sheet can do in a workbook
Add a sheet to a workbook
Unit summary
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
U n i t 4 D i s c o v e r i n g d a t a wi t h e x p r e s s i o n s , f o r m u l a s , a n d f u n c t i o n s
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit objectives
• Describe the types of expressions supported by BigSheets
• Explain how to access
Values from other fields in the same sheet
Values from fields in other sheets
• List the different categories of functions supplied with BigSheets
• Describe the purpose of some of those functions
• List and describe some of the supported column data types
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Unit objectives
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
BigSheets expressions
• Expressions allows you to refine, discover, and explore the data.
• Types of BigSheets expressions:
Literal values
Values from other fields
Values from other sheets
Formulas
− Functions
Expressions
Functions
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
BigSheets Expressions
BigSheets expressions allow you to refine, discover and explore the data that you
have imported. There are four types of expressions. Literal values are either
numeric or string values. Values from other fields or columns can be used. Values
from other sheets can also be used. Then, perhaps one of the biggest and
customizable type of expression, formulas and functions can be used to analyze
your data. Functions are basically predefined formulas that perform calculations on
the data.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Expressions - Formulas
• Formulas are expressions that perform a calculation.
• Consists of one or more of the following parts:
Functions
Operators
Constants
Column references
• In most cases, the result is just a numeric or a text value
• Apply formulas to individual columns, or to an entirely new sheet.
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Expressions - Formulas
Formulas are a specific type of expression that performs a calculation and typically
returns a single numeric or string value. Formulas consists of one or more of the
following parts: function, operators, constants, and/or column references. You can
apply formulas on specific columns, or create an entirely new sheet with the data
that comes directly from a formula.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Functions
• Expressions Formulas Functions
1. Conditional functions
2. DateTime functions
3. Entity functions
4. HTML and XML functions
5. Math functions
6. Selection functions
7. Text functions
8. Text comparison functions
9. URL functions
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Functions
There are nine categories of functions, which are essentially predefined formulas,
supplied with BigSheets.
┌ Note ─────────────────
It is also possible for you to write your own functional plug-ins.
└────────────────────
There are too many functions here, to cover each one individually. The following few
visuals are just to give you an idea of some of the supplied capabilities. Refer to the
IBM Knowledge Center to get detailed information about each function.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Conditional functions
• Conditional expressions
IF (condition, then-expression, else-expression)
• Conditional functions
AND (condition-expression1, condition-expression2, . . . )
OR (condition-expression1, condition-expression2, . . . )
NOT (condition-expression)
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Conditional functions
To apply conditional logic to a set of functions, use the IF function. This is of the
format:
IF (condition, then-expression, else-expression)
If the condition evaluates to true, then the then-expression is executed. If the
condition evaluates to false, then the else-condition is executed. The then-
expression and the else-expression are any formula expressions that produce a
string or numeric value.
Boolean logic is supported in an IF condition through the use of conditional
functions. The AND and OR condition functions require at least two condition
expressions and can have an unlimited number. A condition expression can be
another condition function.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
SELECT function
• Returns all rows in the current sheet containing the specified value in
the stated column
SELECT (column, value)
• The SELECT function must be coded inside another column function
that produces a simple result
COUNT
SUM
• Examples
COUNT(SELECT(JobName, 'CLERK').LastName)
COUNT(SELECT(JobName, #JobName).LastName)
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
SELECT function
The SELECT function returns all rows in the current sheet containing the specified
value in the specified column. For example,
SELECT(GENDER, 'F')
selects all rows where the GENDER column is equal to an F.
The SELECT function returns a complex result. Essentially, this means that the
returned result is not a single string or numeric value but rather the values from
multiple rows. For this reason the SELECT function must be coded inside another
column function that does return a simple result. Coding the SELECT function within
the COUNT function allows you to get the total number of rows returned. Coding the
SELECT function within the SUM function allows you to total the values in the
returned column for all of the rows that met the select criteria.
If you wanted to count the number of employees that held the position of CLERK,
then you might code
COUNT(SELECT(JobName, 'CLERK').LastName)
The SELECT function returns the LastName column for all rows where there is a
value of CLERK in the JobName column. The COUNT function then counts the
number of rows.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
If you coded
COUNT(SELECT(JobName, #JobName).LastName)
then you get a much different result. #JobName refers to the value in the JobName
column for each row. So
SELECT(JobName, #JobName).LastName
takes the value in the JobName column for the first row and then returns all rows
where the value in the JobName column equals the value in the first row. When the
COUNT function is applied, the number of rows return by the SELECT are counted
and that value is returned. The SELECT next looks at the JobName value in the
second row and goes through the process again. This is repeated for each row in
the sheet.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Math
• There are more than 40 mathematical functions
Trigonometric functions
Random number generators
Logarithmic functions
Constants
−e
− PI
Minimum, Maximum
Square root, raising to a power, e raised to a power
Even, Odd, Mod
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Math
There are 48 mathematical functions supplied. There are a number of
trigonometrical functions, random number generators, both between 0 and 1 and
between two supplied values. There are logarithmic functions. You have access to
constants, like PI and e. You can find the minimum or maximum values of a column,
find the square root of a value, raise a value to some power or raise the constant e
to some power. You can round a number up to the nearest odd or even integer, take
the modulo of a number, find the absolute value, truncate a number to an integer
and test to see if a string is a valid number.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Text
• There are over 20 text functions
Functions that apply regular expressions against the data
Convert to upper and lower case
Extract data
− From the left
− From the right
− From a specified position in the middle
Trims spaces, removes non-printable characters
Find data within a string
Replace characters in the text value
Concatenate text
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Text
There are 28 text functions. There are a number that work with regular expressions
in some way. You can convert the text to upper or lower case, concatenate text
values, and extract data from various areas of the text field. You can search for
some occurrence of a string within the text and replace characters within the text.
You can get the length of your text string and you can count the number of individual
words within the provided text.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Text comparison
• Compare two text values for equality
Case sensitive
• Check if a text
Contains a value
Starts with a value
Ends with a value
• Matches a specified regular expression
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Text comparison
There are a few text comparison functions that return values of true and false. Most
likely these functions would be used in the IF (...) function.
You can compare if two values are equal. This is based upon case sensitivity. You
can check if a text value contains some value, starts with a value or ends with a
value. And you can test if a text value matches a supplied regular expression.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
URL
• There are ten functions that work with and extract information from
URLs
There are a number of functions that extract portions of a URL
− Host
− Path
− Port
− Query string
− Parameter
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
URL
There are ten functions that work with and extract information from URLs. Most of
these functions provide portions of the URL, like the host, port, path, query string,
and parameter. Also there are functions that return content information, assuming
that a connection can be established.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
DateTime
• Represents a date in the ISO 8601 format:
yyyy-MM-ddTHH:mm:ss:SSTZD
• TZD – time zone designator
Z
+hh:mm or -hh:mm
• Example for May 07, 2014 at 10:14:30, US Pacific Standard Time
2014-05-07T10:14:30-05:00
2014-05-07T15:14:30z
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
DateTime
The DateTime function is useful for when you need to extract information in your
worksheet based on a date range. The format is ISO 8601 where you need to
specify the year, month, date, followed by time. Then there is the time zone
designator that you specify to indicate the time zone. The example shown here
illustrates what a particular date would look like in the ISO 8601 format.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint
1. List the four types of BigSheets expressions.
2. How do you refer to the value from a different column in the same
row?
3. True or False? The SELECT function must be coded inside another
function to get any meaningful data.
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Checkpoint
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint solutions
1. Four types of expressions:
1. literal values
2. values from another field
3. values from another sheet
4. formulas
2. To refer to the value from a different column of the same row, use the
# symbol.
For example. #DeptName
3. True. The SELECT function must be coded inside another function
that returns a simple value such as COUNT or SUM.
For example: COUNT(SELECT(JobName, 'CLERK').LastName)
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Checkpoint solutions
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1
Working with Functions
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1:
Working with Functions
Purpose:
You will work with the workbook that was created from the WordCount
program. You will add new columns with specific functions to the sheet.
User/Password: biadmin/biadmin
Root/dalvm3
Service Password: ibm2blue
Task 1. Background.
The WordCount application generated a record for each unique character string
found in the specified document. It then totaled the number of occurrences of each
unique character string. Your goal is to create a sheet that has the number of
occurrences for all character strings that occur the same number of times.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
You are provided the regular expression to use. You know that you want the
second group. But what about the text parameter? You want this function to be
applied to each row for the Header column. To indicate that, you specify
#Header. As in:
GETGROUPMATCH(#Header,'(.+\t)([0-9]+)',2)
You are to reference the Wordcount sheet and, as stated, this new column is to
have the name of Occurrences. The final parameter, 2, says to extract the
second group from the regular expression.
3. Code the following in the fx field.
Wordcount!A1 : [Occurrences =
GETGROUPMATCH(#Header,'(.+\t)([0-9]+)',2) ]
4. Click Apply settings.
Task 3. Count the occurrences.
Add another column to your sheet.
1. Click the drop-down for Occurrences and then select Insert Right->New
Column.
2. Type Num for the name.
You want to take the value for each row in the Occurrences column and select
all rows that have that same value. Then count the number of those rows
returned.
3. In the fx field for the Num column, type the following formula:
COUNT(SELECT(Occurrences,#Occurrences).Occurrences)
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
6. Keep the default name for the new sheet and click Apply settings.
Now you have your results. There are 1266 unique character strings that
occurred once. Fourteen unique character strings that occurred 10 times, etc.
The results appear as follows:
7. Click Save, Save and Exit, and name the workbook WordCount Totals.
8. Click Save.
Results:
Using the workbook that was created from the WordCount program, you
added new columns with specific functions to the sheet.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit summary
• Describe the types of expressions supported by BigSheets
• Explain how to access
Values from other fields in the same sheet
Values from fields in other sheets
• List the different categories of functions supplied with BigSheets
• Describe the purpose of some of those functions
• List and describe some of the supported column data types
Discovering data with expressions, formulas, and functions © Copyright IBM Corporation 2015
Unit summary
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit 5 Integrating with Big SQL
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit objectives
• Manage the data lifecycle through Big SQL
Create new tables using the same data as the sheet
Create new sheets using the same data as the table
Unit objectives
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
[Link]
Common
Catalog
HCatalog
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint
1. How do you create a Big SQL table from a workbook?
2. How do you create a workbook from a Big SQL table?
3. True or False? Both the sheet and the table share the same data
source.
Checkpoint
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint solutions
1. To create a Big SQL table from a sheet:
1. Click the Create Table pushbutton and specify the table schema and
name. Alternatively, you can also export out as a TSV format and create a
SQL query to create the table based on that.
2. To create a sheet from a Big SQL table:
1. Export the table's data as CSV and create a workbook from that file.
3. True. Both the sheet and table share the same data.
Checkpoint solutions
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1
Integrating with Big SQL
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1:
Integrating with Big SQL
Purpose:
The integration with Big SQL allows you to perform additional analytical
queries against the data. It extends upon the capabilities of BigSheets
allowing you to use common SQL queries to get insight from the data. You
will use Big SQL tables with BigSheets.
User/Password: biadmin/biadmin
Root/dalvm3
Service Password: ibm2blue
In this demonstration you are going to turn that text data into a BigSheets workbook,
and then use the functions in BigSheets to format the data into something that is
easier to understand.
To examine the blogs data in the [Link] file, you will create a workbook and
use that data for a new Big SQL table. This demonstration introduces a way of
creating tables from data that you analyze by using BigSheets and a TSV reader
format and a JSON Array format.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
7. Click OK.
8. Ensure that the Include Headers check box is not checked and then click
OK.
9. Click OK to close the message dialog.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
10. Make a note of the column names and the type of data from the BigSheets
workbook that you want to define in Big SQL. You exported these columns
from BigSheets:
Country - contains a two-letter country identifier.
FeedInfo - contains information from web feeds, with varying lengths.
Language - contains the string that identifies the language of the feed.
Published - contains a date and time stamp.
SubjectHtml - contains a subject that is of varying length.
Tags - contains a string of varying length that provides categories.
Type - contains the source of the web feed, whether a news blog or a public
feed.
URL - contains the web address of the feed, with varying length.
Task 5. Creating a Big SQL script that creates Big SQL tables
from the exported TSV file.
In this section, you create an SQL script to create Big SQL queries based on the
BigSheets blogs data workbook.
1. In the Linux command line, create a SQL script named [Link], type
or paste the following code:
cat > /home/biadmin/labfiles/bigsheets/[Link]
CREATE SCHEMA IF NOT EXISTS BigSheetsAnalysis;
USE BigSheetsAnalysis;
4. View the contents of the file to ensure you created it properly by typing the
following:
cat /home/biadmin/labfiles/bigsheets/[Link]
5. Go to the BigInsights - Home page by using the browser bookmark or type in
this URL:
[Link]
html
6. Click the Big SQL link to open up the Big SQL UI.
Note: If Big SQL is unavailable, you need to run the dsmKnoxSetup script as
indicated in Task 2 of this lab exercise.
7. Click the SQL Editor link from the left side.
8. Click the Open link.
9. With Local selected, click the Browse button and navigate to
/home/biadmin/labfiles/bigsheets/[Link].
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
12. Under Database connection, select Name, and then select BIGSQL from the
dropdown.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Now that the results of the workbook are imported into Big SQL, you can
perform analytical queries. That is beyond the scope of this lab. Refer to the Big
SQL course for more information.
Task 6. Creating a Big SQL table using built-in integration.
You saw in the previous section how to export BigSheets workbook as a TSV file. In
fact, you can export out in a number of different file formats to be used with any
number of database systems, such as Big SQL. However, there is an added bonus
if you choose to use Big SQL. I'm sure you have heard of the "easy" button, and
that's exactly what you have here.
1. In the BlogsDataRevised workbook, click Create Table and keep the
default schema and table name ([Link]).
2. Click Confirm.
Notice that the button changed its label to Delete Table. This means that
you can only have one Big SQL table for a workbook.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
3. Go to the Big SQL page and click the Explore Database link.
4. Connect to the BIGSQL database using your login credentials.
5. Navigate through the Hadoop Tables view to find your newly created table
(from the click of a button).
Again, now you can work with this table as if it were any database table.
You can run queries against it to find out more insight from the data.
Task 7. Troubleshooting (Optional).
Big SQL has some limitations running on a single node cluster (actually, anything
less than a 3 node cluster) and for good reasons too. You do not ever want to have
a single node cluster for your production environment.
In the training world, simpler is better. Your lab environment should have been
configured with this fix to allow to create Big SQL tables, but if it wasn't, you can run
this yourself:
1. First, open up a new terminal.
2. Switch to the bigsql user.
3. Run this command to connect to the bigsql database:
db2 connect to bigsql
Database Connection Information
Database server = DB2/LINUXX8664 10.6.3
SQL authorization ID = BIGSQL
Local database alias = BIGSQL
4. Run this command for the fix:
db2set DB2_DYNAMIC_PMAP=INCLUDE_HEAD_NODE
5. Restart the Big SQL service from Ambari.
This will allow you to create Big SQL tables (if you were not able to before).
Purpose:
You used Big SQL tables with BigSheets.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit summary
• Manage the data lifecycle through Big SQL
Create new tables using the same data as the sheet
Create new sheets using the same data as the table
Unit summary
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
U n i t 6 V i s u a l i z i n g d a t a wi t h B i g S h e e t s
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit objectives
• Describe the visualization techniques supported by BigSheets
• Explain how to export data from a collection
Unit objectives
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Tag Cloud - Shows the value; the relative size of a word reflects its value.
Area - Shows a trend in data over time by connecting a series of points that
represent individual measurements.
Pie - Shows proportionate relationships; the relative size of the "slice" reflects the
proportion of the data.
Bar - Shows proportionate relationships; the relative length of a rectangular bar
reflects the proportion of the data. The bars are displayed vertically.
Line - Shows a trend in data over time by connecting a series of points that
represent individual measurements.
Horizontal Bar - Shows proportionate relationships; the relative length of a
rectangular bar reflects the proportion of the data. The bars are displayed
horizontally.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Pie Chart
Bar chart
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Cloud
Text/Tag Cloud
Bubble Cloud
Cloud
This is an example of a Tag Cloud chart. The difference in font sizes has particular
mean, that is, the larger the font the more numerous the values. In this case the
graph is dealing with occurrences of records that have the same state value. States
like Arizona, California, Georgia, and Tennessee have a greater number of
references in the data when compared to Maine, Montana, New Mexico, and
Nebraska.
The example of the Bubble Cloud shows the magnitude of the value. The size of the
bubble is proportional to the magnitude of the data within the worksheet.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Maps
Map
Heat Map
Maps
The final way to visualize data is through maps. There are two types. The map type
counts and charts data points by name, and then shows those data values overlaid
on either a map of the world or a map of the United States.
The second type is a heat map. This type charts the locations and concentrations of
data points, and then shows the magnitude of those points in relation to other points
overlaid on either a map of the world or a map of the United States.
Heat maps require 3 primary values: valid latitude and longitude as well as a value
that you want to represent at those points. Latitude and longitude columns that you
select from the collection must be represented in decimal point expressions.
Longitude values west of the prime meridian are designated as negative values.
Likewise latitude values south of the equator are designated as negative values.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Creating a chart
Creating a chart
To create a chart, select the Add chart hyperlink for a workbook. Even master
workbooks can have charts. Choose the type of chart and then specify the
appropriate input parameters.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Exporting data
• Select Export as
Choose the data format
• Specify whether to export to a file or a browser window
• Select whether to include headers
Exporting data
Data in a BigSheets workbook can be exported into a variety of formats. The export
process allows you to choose as the destination either a file or a web browser. If a
browser is chosen, a browser window is opened and by default, 500 rows are
exported. You can change how many rows to export to a browser by specifying a
new number for &amount=500 in the URL and refreshing the page. You can then
copy the contents of the browser window to another location to save it.
You saw in the previous unit that you can use this method to export your data and
import it into Big SQL. A different type of database system can also be used.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint
1. List three categories of charts supported by BigSheets.
2. List two types of clouds.
3. True or False? Master workbook can have charts.
Checkpoint
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Checkpoint solutions
1. The types of charts:
1. Map
2. Cloud
3. Chart (basic)
2. Bubble cloud and tag cloud.
3. True. Master workbook can have charts.
Checkpoint solutions
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1
Analyzing Social Media and Structured Data
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Demonstration 1:
Analyzing Social Media and Structured Data
Purpose:
In this demonstration, you will use BigSheets to analyze social media data
and use various forms of BigSheets visualization to present the results. You
will use all you have learned so far in this course to complete this
demonstration. In the second portion of this demonstration, you will join the
social media data with DBMS data to do further analysis and finally conclude
with visualizing the data with BigSheets.
User/Password: biadmin/biadmin
Root/dalvm3
Service Password: ibm2blue
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
3. Make a note of which files already exist and use the following to upload each of
the three files, as needed.
If any of the files already exist, the command will fail.
hdfs dfs -put
/home/biadmin/labfiles/bigsheets/RDBMS_data.csv
/user/biadmin
hdfs dfs -put /home/biadmin/labfiles/bigsheets/blogs-
[Link] /user/biadmin
hdfs dfs -put /home/biadmin/labfiles/bigsheets/news-
[Link] /user/biadmin
4. If needed, do another listing of the /user/biadmin directory on hdfs to make
sure you have all three files under /user/biadmin.
hdfs dfs -ls /user/biadmin
Task 2. Creating a BigSheets Workbook from the RDBMS
data.
1. Open up the BigSheets page from BigInsights Home.
2. Click New Workbook.
3. Name the workbook, Media Contacts.
4. Select the [Link] file under /user/biadmin.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
5. Click Edit workbook reader, select the JSON Array reader and then click Set
reader .
6. Now with the data formatted properly, scroll down (if you have to) and click
Save workbook.
Tag your sheet. This allows you to quickly search and manage your
workbooks.
7. Scroll to the bottom of the workbook to view the workbook details. If you do not
see the detail information, click Toggle from Normal to Fullscreen which is
located above the workbook data in the upper right of the BigSheets page.
9. In the Tag value box type Watson, and then click Save tag .
10. Repeat by adding IBM and Blogs as tag values.
You will now create a second workbook for the [Link] file.
11. Create a new workbook called WatsonNews.
12. Add Watson, IBM, and News as tags to this new workbook.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
13. Click the Workbooks breadcrumb tab to get a list of all workbooks.
You should see the three workbooks you created in this demonstration as
well as others from previous demonstrations.
3. Change the workbook name by clicking Edit workbook name , and then
change the name to WatsonNewsRevised.
4. To view more of the columns, click Fit column(s).
You are not going to need the IsAdult column.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
5. Click the drop-down arrow for the isAdult column and then select Remove.
The data was not actually deleted. The mapping to the column was removed.
You need to remove a number of columns.
6. Click the drop-down arrow for any column and then select Organize Columns.
Clicking a red X removes that column.
7. Click the red X to remove the following columns.
a. Crawled
b. Inserted
c. MoreoverUrl
d. PostSize
8. Click Apply settings.
9. Click Save, select Save & Exit and then click Save.
10. Run your workbook.
11. In the Watson Blogs workbook, follow the same steps as above to remove the
following columns.
e. Crawled
f. Inserted
g. isAdult
h. PostSize
12. Save this new workbook as WatsonBlogsRevised.
13. Run the WatsonBlogsRevised workbook.
Task 5. Union the two workbooks.
Because both workbooks have the same structure now, you can union them. This
becomes the basis for exploring the coverage of IBM Watson across the sources
that the Boardreader provided.
1. Click the Workbooks breadcrumb tab and select the WatsonNewsRevised
workbook.
2. Click Build new workbook.
3. Click Add sheets.
4. Click Load and then click WatsonBlogsRevised.
5. Change the sheet name to WatsonBlogsRevised and then click Apply
settings.
Now the data from both revised workbooks is accessible in order to add the
data into a single sheet.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
10. Save the workbook as Watson News and Blogs and then exit the workbook.
11. Run the workbook.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
14. Click Workflow Diagram which is to the right of Build new workbook.
This shows the workbooks that were used to create the current workbook.
Close this window.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
9. Click Fit column(s) so that you can see both the Language and the Type
columns.
The sort that was performed is only running on a subset of the data. When
you save and run the workbook, the sort gets applied to all of the data so
you might see some differences. For example, the subset of data has only a
few records where the Language is Vietnamese. This changes when all of
the data is used.
10. Save, exit and run your workbook.
Task 7. Visualize your data.
You should be in the WatsonSorted workbook. Assume that you are interested
in seeing the number of posts associated with each language.
1. Click Add chart.
2. Select the chart hyperlink and choose Pie.
3. Add the following in the Pie chart info.
a. Chart Name - Language Coverage
b. Title - IBM Watson Coverage by Language
c. Value - Language
d. Count - Count occurrences of X axis values
e. Sort by: Value
f. Limit - 12
4. Click Apply settings.
5. Click Run and wait for all of the data to be processed.
6. Move the cursor over the various segments to see that Chinese - Simple is
next to a segment for Chinese (Spelling).
After reviewing you want to have all of the Chinese posts in a single segment.
7. Click Edit.
To do the combination trick, you need to add a new column. Move the cursor
over the Language column. Then, click the drop-down that is displayed.
8. Select Insert Right->New Column.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
6. Add a sheet that Loads the Media Contacts workbook into your new,
Watson Media Analytics workbook.
7. Name this sheet Media Contacts.
8. To make the last column of the Media Contacts more clear, rename it
Last_Contact.
Move the cursor over the header4 column and click the drop-down. Choose to
rename the column.
9. Change the name of the header3 column to URL.
10. Join the data, add a new sheet and then select Join.
11. Name the sheet Join URLHOSTS and Contacts.
12. From the Join Type drop-down menu, select inner join.
13. In the Add sheets drop-down, select URL Hosts and then click Add sheet.
14. Add the Media Contacts sheet and then click Add sheet.
15. For the URL Hosts sheet, select the URLHOST column and for the Media
Contacts sheet, select the URL column.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
17. As an additional way to make your results look more intuitive, you can
reorganize the order of the columns by using the Organize Columns option or
by dragging and dropping the column. Do that by a left-click-mouse-grab on the
letter above the column name. Also, another option is selecting Fit Columns.
18. Save, exit, and run the workbook.
You have now joined different data sources together in a BigSheets
workbook.
Results:
You joined social media data with DBMS data, and then analyzed the data with
BigSheets.
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE
Unit summary
• Describe the visualization techniques supported by BigSheets
• Explain how to export data from a collection
Unit summary
This material is meant for IBM Academic Initiative use only. NOT FOR RESALE