SAS Visual Analytics PDF
SAS Visual Analytics PDF
SAS® Documentation
The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2015. SAS® Visual Analytics 7.3: User’s Guide. Cary, NC:
SAS Institute Inc.
SAS® Visual Analytics 7.3: User’s Guide
Copyright © 2015, SAS Institute Inc., Cary, NC, USA
Chapter 19 / Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
About Scheduling Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Creating Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Export Data Queries as Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Additional Scheduling Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Appendix 11 / About the Classic SAS Visual Analytics Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . 615
Your First Look at the Classic SAS Visual Analytics Home Page . . . . . . . . . . . 615
Manage Content on the Classic Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Working with the Right Pane on the Classic Home Page . . . . . . . . . . . . . . . . . . 621
Discover Details Using the Object Inspector on the Classic Home Page . . . . 623
Add Comments to Objects on the Classic Home Page . . . . . . . . . . . . . . . . . . . 625
Specifying Your Preferences for the Classic SAS Visual
Analytics Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
About Searching from the Classic Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . 629
Refining Your Search Results for the Classic Home Page . . . . . . . . . . . . . . . . . 631
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
xiv Contents
xv
Audience
The features of SAS Visual Analytics are designed for the following users:
n Persons needing to explore data in support of ad hoc business questions.
n Persons responsible for designing and creating reports for their enterprise.
n Persons responsible for analyzing report data and making decisions based
on that data.
Persons responsible for managing SAS servers and managing the SAS Visual
Analytics environment should refer to SAS Visual Analytics: Administration
Guide.
The content of this document is also applicable to other SAS solutions that
integrate with and use SAS Visual Analytics features.
Prerequisites
Here are the prerequisites for using SAS Visual Analytics:
n A user ID and password for logging on to SAS Visual Analytics.
Documentation Conventions
This book uses short forms of the following phrases where the meaning is clear
from context:
User Interface
Long Form Short Form Labels*
SAS Visual Analytics Graph Builder the graph builder Custom Graph Builder
* Labels in parentheses are used only in the classic (Flash) presentation mode.
** Not all SAS Visual Analytics orders include the explorer.
xvii
Whatʼs New
What’s New in SAS Visual Analytics
7.3
The new feature in SAS Visual Analytics Designer is a new Expand clipped
content option, which is available for printing to PDF. This option enables you to
print the entire content of tables, crosstabs, gauges, and containers with content
that is only partially available in the layout of the report section.
The new feature in SAS Visual Analytics Viewer is a new appearance called
modern, which is the default. You can use preferences to specify the
appearance of the viewer as modern or classic. The modern appearance
includes a Report Refresh setting, which lets you specify how many minutes to
wait between update checks.
xviii What’s New in SAS Visual Analytics 7.3
Accessibility
For information about the accessibility of this product, see Accessibility Features
of SAS Visual Analytics 7.3.
xx What’s New in SAS Visual Analytics 7.3
1
Part 1
Introduction to SAS Visual Analytics
Chapter 1
About SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 2
Accessing SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2
3
1
About SAS Visual Analytics
What Is SAS Visual Analytics? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Benefits of Using SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
How Does SAS Visual Analytics Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
SAS Visual Analytics User Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
n enables users to share insights with anyone, anywhere, via the web or a
mobile device
Explore Data
Utilize Self-Service
Predictive and
Prescriptive Analytics
Create Hierarchies
Dynamically
Filter on Selection
Build Analytical
Analyst Models
Reports View on
Home
Build Predictive Mobile Device
Find Content and
Descriptive Models View Online
and Offline
Statistician or Explore Data
Data Scientist Evaluate Models Filter and Drill
Create Report
Generate DATA Step Collaborate
Code for Scoring
Prepare Data Customize Reports
Generate Model
Outputs Using Parameters
Report Designer Manage
Environment
Create Report
Data Administrator Design Reports View on Web
and Dashboards
View Online
Layout and
Style Precisely
Filter and Drill
Define Interactions
IT Administrator and Display Rules
Collaborate
Add Controls
for Filtering Customize Reports
Schedule and Using Parameters
Distribute Reports
Prepare Data
= SAS Visual Analytics license
Join Tables
Stage Data
= SAS Visual Statistics license
Distribute Data
Manage
Environment
Monitor Resources
Administer Security
Load Tables
Manage
Mobile Devices
and
LASR Servers
2
Accessing SAS Visual Analytics
About SAS Visual Analytics Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Authenticated Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Guest Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Use SAS Home to Access SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Overview of SAS Visual Analytics Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About the Availability of Menus and Menu Selections in
SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About Application Themes in SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Specifying Your Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Specify Preferences for SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Specify Settings Using SAS Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Specify Global Settings Using SAS Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Personalize SAS Visual Analytics Using SAS Home . . . . . . . . . . . . . . . . . . . . . . . . . 11
Authenticated Users
SAS Visual Analytics uses the standard sign-in window for SAS applications. To
display the sign-in window, use the URL that is supplied by your system
administrator. For example, you might enter: http://host/SASVisualAnalyticsHub
Click Sign Out in the upper right corner of the user interface to sign out of SAS
Visual Analytics. When you click Sign Out, you are signed out of all SAS web
applications. For example, suppose that you have SAS Home (the home page),
the explorer, and the designer open, and then you click Sign Out when you
finish working on a report in the designer. In this case, you have also signed out
of the home page and the explorer.
Guest Access
SAS Visual Analytics system administrators can configure support for guest
access. Users with guest access can access only the home page and SAS
Visual Analytics Viewer (the viewer). Guest access uses a shared account, so it
does not provide individualized features, such as history or alerts. If provided by
the system administrator, favorites and preferences are read-only features.
8 Chapter 2 / Accessing SAS Visual Analytics
n the currently selected report object. For example, ranges are not available for
list tables.
n whether the data for a report has been defined. For example, if the data has
not been selected, then you cannot create a filter.
For more information about roles and capabilities, see the SAS Visual Analytics:
Administration Guide.
Note: Settings are available for the modern viewer. For more information, refer
to the online Help that is available for the modern viewer.
1 On the modern home page, select your name, and then click or tap Settings.
Default Appearance
enables you to specify the appearance when the home page is displayed.
Initial Screen
enables you to specify the initial screen when the home page is
displayed. The available options depend on your role and capabilities.
Application Shortcuts
enables you to specify the order of your application shortcuts.
Tiles
enables you to specify which tiles are displayed and the order in which
they are displayed.
For more information, refer to the online Help that is available for the modern
home page.
For information about the classic home page, see “Specify Your Preferences for
the Classic Home Page” on page 628.
1 On the modern home page, select your name, and then click or tap Settings.
Personalize SAS Visual Analytics Using SAS Home 11
For information about the classic home page, see “Specify Global Preferences
Using the Classic Home Page” on page 627.
n Keyboard shortcuts: You can use keyboard shortcuts as a quick and easy
way to perform tasks or navigate the user interface. For more information,
see “Keyboard Shortcuts for SAS Visual Analytics” on page 541.
For more information, see Accessibility Features of SAS Visual Analytics 7.3.
For information about the classic home page, see “Specify Global Preferences
Using the Classic Home Page” on page 627.
13
Part 2
Accessing Data
Chapter 3
Overview of Data Flow in SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 4
Importing Local Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chapter 5
Importing Data from Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Chapter 6
Importing Data from Other Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
14
15
3
Overview of Data Flow in SAS Visual
Analytics
Data Flow in SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Self-Service Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Managed Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
After a SAS LASR Analytic Server Restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Requirements for Importing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
SAS Visual Analytics Administrator provides features that are most commonly
associated with managed data access. The administrator enables control of
whether tables are loaded to memory and secures access to in-memory tables.
TIP The self-service import feature keeps track of your most recently used
values for each import type to simplify repeated import actions.
4
Importing Local Data Files
Import a Local Data File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Limitations and Restrictions for Importing Local Data Files . . . . . . . . . . . . . . . . . 21
Large Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Importing Data from Spreadsheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table Names, Column Names, and Special Characters . . . . . . . . . . . . . . . . . . . . . . 22
Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Self-Service
Components
SAS Workspace
Server
Job Execution
PROC IMPORT
Service
Temporary DBMS
Data File
Spreadsheets
and
Delimited Files
Note: When you import a SAS data set, it is not processed with PROC
IMPORT. SAS data sets are transferred to output with a DATA step.
20 Chapter 4 / Importing Local Data Files
Note: Only the data builder can output a SAS data set or a DBMS table. The
explorer and designer can import data to SAS LASR Analytic Server only.
You can import data files that are available from the file systems on your PC.
This includes local file systems such as C:\ on Windows machines and paths
such as /home/$USER on UNIX machines. Network file systems and shared
folders are included, such as UNC paths like \\nas\spreadsheets.
To import data from a Microsoft Excel spreadsheet, delimited text file, ZIP file, or
SAS data set:
1 In the Import Data window, click the link for the type of data file that you want
to import, and then select the file.
3 (Optional) Click Preview to view the data. Preview displays up to 500 rows
from the file.
TIP Previewing the data can help you determine whether you specified
the correct encoding.
4 (Optional) In the Output Table section, enter the name for the output table
and a description. The description is limited to 256 characters. Review the
library and location settings by clicking Advanced. Make any necessary
changes.
You do not have access to the Advanced section if you are using the
explorer or designer and do not have the Build Data capability. Instead, you
can import the data to a general-purpose area or select Store the table in a
private location to prevent other users from accessing the data.
5 Click OK.
n You can import Excel workbook (XLSX, XLSM, and XLSB) files and Excel
97-2003 workbook (XLS) files. You cannot import XLST or other Excel file
types.
Here are some key points about importing XLSB files:
o The machine for the SAS Workspace Server must have the following
provider software installed: Microsoft Data Access Components (MDAC)
and Microsoft Jet (Joint Engine Technology) or Microsoft Access
Database Engine (formerly know as Microsoft Access Connectivity
Engine or ACE) for 2007 and later.
o The bit version of Microsoft Access Database Engine must be the same
as the bit version of SAS.
o You can import XLSB files only if the SAS Workspace Server is running
on Microsoft Windows.
TIP If your spreadsheet is from an unsupported Excel file type, then try
saving it as an XLSX file before importing it.
n When you import a spreadsheet (from your PC) that has multiple worksheets,
by default, all of the worksheets are imported. A table is created for each
worksheet. You can clear the check boxes for the worksheets that you do not
want to import.
n Importing pivot tables is not supported.
n Text files Column names are assigned VAR1, VAR2, and so on.
The following table identifies how a column name that begins with a number,
such as 2014sales, or that uses numbers only, such as 2014, will appear after
being imported:
Usage Notes
Review the following notes if you have trouble importing data:
n Before you click OK to import the data, click Preview. Preview shows an
accurate representation of the column names and data values that will be
available after the import.
n If SAS is configured as a Unicode server at your site, then you have the most
flexibility for importing data. Specifically, SAS as a Unicode server helps with
using column names or filenames (that are used as table names) that have
double-byte characters.
n When you import a delimited text file (CSV file), you must specify the
encoding of the text file. In some cases, the import reports success, even
though the data might be corrupted. It is important to verify the imported
data.
n If you import a SAS data set that uses user-defined formats, then you must
ensure that the custom format catalog is available to the SAS Application
Server. For more information, see “Working with User-Defined Formats” on
page 39.
n If importing large data files at the same time is common for your deployment,
then you should be aware that large data files are written to temporary disk
space on the server. In extreme cases, this can cause temporary disk space
to become full. Systems that run out of disk space can become unresponsive
and difficult to troubleshoot.
n If you import data from text files and plan to append the data, then you must
verify that the column data types and lengths match the table that you want
to append to.
n When you import data, a SAS LASR Analytic Server does not maintain pre-
existing sort orders. You must re-sort the data after you import it.
n Importing indexed SAS data sets is not supported.
24 Chapter 4 / Importing Local Data Files
25
5
Importing Data from Servers
Import a SAS Data Set on a Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Import a Database Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Database Connection Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Additional Options for Importing Hadoop Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Additional Options for Importing ODBC Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Additional Options for Importing Oracle Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Additional Options for Importing PostgreSQL Tables . . . . . . . . . . . . . . . . . . . . . . . . 29
Additional Options for Importing Teradata Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
SAS Web
Application Server
Self-Service
Components
SAS Workspace
SAS LASR
Server
Analytic Server
Job Execution
DATA Step
Service
You can direct the SAS Workspace Server to access the file systems on the
server. For example, if you have a large data set, you can use FTP or another
method to copy it to a directory on the server, and then use the server to import
it.
To import a SAS data set that is accessible from your SAS Application Server:
1 Select SAS Data Set from the list of Server data types, navigate to the SAS
data set, and click OK.
Note: Remember that the data files and directories are on the remote
machine, not on your PC.
2 (Optional) In the LASR Table section, enter the name for the table and a
description. The description is limited to 256 characters. Review the library
and location settings by clicking Advanced and make changes if necessary.
You do not have access to the Advanced section if you are using the
explorer or designer and do not have the Build Data capability. Instead, you
can import the data to a general-purpose area or select Store the table in a
private location to prevent other users from accessing the data.
3 Click OK.
1 From the Import Data window, select the database name from the list of
server or Hadoop databases. These lists include only the data sources for
which a SAS/ACCESS product is licensed and configured and that your
administrator has granted you the capability to use.
If you want to import SAS Data Set on a server, see “Import a SAS Data Set
on a Server” on page 25 for more information.
2 Specify the connection information. Here are some key points about
specifying connection information:
n The Server field corresponds to the host name for the server. Some
databases connect using a data source name instead of the combination
of server and port.
Import a Database Table 27
n In the DBMS table names field, you can import multiple tables at the
same time. To do this, hold down the Ctrl key while selecting the table
names in the Choose Tables window. During the import, an icon in the
Status column indicates whether the table was successfully imported, if it
failed, or if you chose to cancel. By clicking the link in the Remarks
column, you can view additional information, such as log or error
messages.
For connection details for specific databases, see the “Database Connection
Tips” on page 28 topic.
Most fields are case sensitive. For example, specifying a value of products
in the Database field might not be the same as specifying PRODUCTS.
Case sensitivity depends on the database vendor. Furthermore, some
databases use schemas. Some databases automatically use the user ID as
the schema if a schema is not explicitly specified. Be aware that the User ID
and Schema fields can be case sensitive. Check with your database
administrator if you are unsure.
The options keyword is submitted with any options that you specify in
this field.
6 Click OK.
If the table fails to reload, the log might not contain any error information. In this
case, the log is most likely displaying information about the last successful
action on the table.
Note: If you are importing a single table, then you cannot cancel it. You can
choose to cancel if you are importing multiple tables. However, the table that is
being processed when the cancel was submitted cannot be canceled and will
finish loading.
Specifying more options might be necessary for your site. For information about
setting up parallel loading from Hadoop, see “Where Do I Locate My Analytics
Cluster” in SAS Visual Analytics: Installation and Configuration Guide
(Distributed SAS LASR).
service name for the connection information is in this file. See the following
figure:
6
Importing Data from Other Sources
Import Data from Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Import Data from Google Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Import Tweets from Twitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2 Click OK in the Import Facebook Data window to accept the terms and
conditions.
If you would like to view the terms or remove authorization after completing
this step, click Clear Authorization on the lower left-hand side of the Import
Facebook Data window.
3 Indicate the Facebook fan page that you want to import. Valid values include
the full URL (for example, http://www.facebook.com/SASsoftware) or
the page name (for example, SASsoftware).
6 (Optional) In the LASR Table section, modify the table name and description.
Review the library and location settings by clicking Advanced. Make any
necessary changes.
You do not have access to the Advanced section if you are using the
explorer or designer and do not have the Build Data capability. Instead, you
can import the data to a general-purpose area or select Store the table in a
private location to prevent other users from accessing the data.
8 Click OK.
A Facebook limitation can cause the table to be created with only partial data. If
this occurs, you will receive a warning message. To get a complete data set, try
making one or more of the following adjustments before rerunning the import:
32 Chapter 6 / Importing Data from Other Sources
2 Click Obtain access code in the Import Google Analytics window. The
Google Analytics service opens in a new window.
3 After signing in with your Google user name and password, click Accept to
accept the terms and conditions.
5 Navigate back to SAS Visual Analytics. Paste the code (Ctrl+V) in the Paste
access code here field.
7 (Optional) Modify the fields and date range based on the data that you would
like to import.
Note: The default value for the maximum number of rows that you can
import is 100,000. For more information, contact your administrator.
8 (Optional) In the LASR Table section, modify the table name and description.
Review the library and location settings by clicking Advanced. Make any
necessary changes.
You do not have access to the Advanced section if you are using the
explorer or designer and do not have the Build Data capability. Instead, you
can import the data to a general-purpose area or select Store the table in a
private location to prevent other users from accessing the data.
9 (Optional) Review the Proxy Server section. Make any necessary changes.
10 Click OK.
in the table. To increase your chance of getting a complete data set, try
rerunning the import with a smaller date range.
Note: If you want to reload data for an existing table using the same table
name, you must do one of the following:
n Use the same library and output folder that were used when the table was
originally imported.
n Indicate both a different library and a different output folder than when the
table was originally imported.
Note: It is recommended that your SAS server be configured to use UTF-8
encoding while importing data from Google Analytics. Otherwise, it could impact
your ability to import data that includes nonstandard ASCII characters.
For more information about dimensions and metrics in Google Analytics, see
https://support.google.com/analytics/answer/1033861?hl=en and https://
developers.google.com/analytics/devguides/reporting/core/dimsmets.
The first time you import tweets, you are directed to the Twitter website to log
on to your account and authorize SAS Visual Analytics. After you enter your
logon information and click Authorize app, the SAS product page opens.
Close this page and navigate back to SAS Visual Analytics.
After the initial logon, SAS Visual Analytics uses authorization tokens for
accessing Twitter instead of requiring you to log on each time. If you would
like to change users or remove authorization after completing this step, click
Clear Sign In Information on the lower left-hand side of the Import Twitter
Data window.
3 (Optional) In the LASR Table section, enter the name for the table and a
description. Review the library and location settings by clicking Advanced.
Make any necessary changes.
You do not have access to the Advanced section if you are using the
explorer or designer and do not have the Build Data capability. Instead, you
can import the data to a general-purpose area or select Store the table in a
private location to prevent other users from accessing the data.
4 (Optional) Review the Proxy Server section. Make any necessary changes.
5 Click OK.
The search results from a Twitter import in SAS Visual Analytics and the search
results from Twitter’s own search interface do not match exactly. Each uses a
different mechanism to download tweets. A Twitter import in SAS Visual
Analytics uses Twitter’s public search API. There are limits on what data and
34 Chapter 6 / Importing Data from Other Sources
how much data that SAS can download using Twitter’s public search API. These
limits might not apply to Twitter’s own search interface. For more information,
see https://dev.twitter.com/rest/reference/get/search/tweets.
For information about the data structure of imported tweets, see Appendix 10,
“Schema for Imported Tweets,” on page 611.
Note: Rate limits apply to the Twitter service. Such limits are beyond the control
of SAS Visual Analytics. You are required to follow all applicable terms of use
that Twitter and others might promulgate for Twitter data.
Note: Certain functionality in SAS Visual Analytics enables you to invoke
external third-party resources. Be aware that use of these resources might result
in disclosure and transmission of information that you submit to these resources.
35
Part 3
Preparing Data
Chapter 7
Overview of SAS Visual Data Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Chapter 8
Specifying Preferences for SAS Visual Data Builder . . . . . . . . . . . . . . . . . . 41
Chapter 9
Creating Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Chapter 10
Working with Tables in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Chapter 11
Working with Columns in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Chapter 12
Working with Filters in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Chapter 13
Working with Joins in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Chapter 14
Creating LASR Star Schemas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Chapter 15
Working with SAS LASR Analytic Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
36
Chapter 16
Importing SAS Information Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Chapter 17
Supporting Text Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Chapter 18
Customizing Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Chapter 19
Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Chapter 20
Using the Results Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
37
7
Overview of SAS Visual Data Builder
What Is SAS Visual Data Builder? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Your First Look at SAS Visual Data Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Importing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
About Managed Access to DBMS Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Working with User-Defined Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
n database tables
n Facebook, Google Analytics, and Twitter
After you import the data, you can prepare it for analysis or join it with existing
data.
The data builder provides a series of features that take advantage of the in-
memory tables in SAS LASR Analytic Server.
You can perform the following operations to add data to memory in the server:
n load an existing table directly into memory
n load the results of a data query into memory (or stage the data and then load
it into memory)
n append rows to an in-memory table
38 Chapter 7 / Overview of SAS Visual Data Builder
After the data is in memory, you can perform the following operations with in-
memory tables:
n join in-memory tables to form a LASR star schema
1 The application bar enables you to return to the home page and to access
other parts of SAS Visual Analytics and other SAS applications that integrate
with the home page. You can access your recently created or viewed reports,
explorations, stored processes, data queries, or other objects in your recent
history. Buttons are displayed for each open application.
2 The menu bar contains menus that enable you to perform tasks such as
creating new data queries and LASR star schemas. The right side of the
menu bar has a memory gauge that displays the memory utilization for a
distributed SAS LASR Analytic Server. You can also sign out of SAS Visual
Analytics.
3 The navigation pane displays a tree (the SAS Folders tree) of tables and
data queries.
4 The center of the screen contains the workspace. When you create a new
object, such as a data query, it is represented as a tab on the top of the
workspace.
The bottom of the workspace contains a series of tabs that enable you to
create column expressions, joins, and filter data.
Working with User-Defined Formats 39
5 The right pane enables you to manage the properties of the item that is
selected in the workspace.
6 The toolbar contains icons that enable you to manage, run, and schedule
data queries.
Importing Data
The data builder has self-service data import features. After you select File
Import Data, you can click the link for the type of data that you want to import.
For more information, see Chapter 4, “Importing Local Data Files,” on page 19,
Chapter 5, “Importing Data from Servers,” on page 25, and Chapter 6, “Importing
Data from Other Sources,” on page 31.
Format menu to go back to the original user-defined format. You can click to
undo the change to the format if you have not saved your work yet, or you can
remove and add the column back again.
Even if the custom format catalog is made available to the SAS Application
Server correctly, you cannot associate a user-defined format to a variable with
the data builder. The menu in the Format column does not enable you to specify
a user-defined format.
41
8
Specifying Preferences for SAS
Visual Data Builder
Specifying Global and General Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Specify Your Preferences for the Data Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
9
Creating Data Queries
What Is a Data Query? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
About Creating Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Save Your Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Save a Data Query as a New Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Using the Design Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Adding a Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Add a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Add a Subquery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Support for Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Best Practices for Adding Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Specifying Properties for a Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
As you create your data query, click to validate your data query. Use the
button to preview or run the data query.
The preview option uses a temporary table for the output table. Clicking the
Results tab shows only the first 100 rows. When you run the data query, it uses
the specified output table instead of a temporary table.
44 Chapter 9 / Creating Data Queries
1 Opens the analyst's data query, and clicks to save a copy of the data
query with a new name.
2 Filters the data on the Where or Having tab for the geographic region.
3 Clicks Clear on the Outputs tab, and then specifies new output table
information. This ensures that the original output table, Sales, for the original
data query is not overwritten.
See Also
“Output Tables” on page 50
See Also
n Chapter 10, “Working with Tables in Data Queries,” on page 49
n Chapter 11, “Working with Columns in Data Queries,” on page 55
n Chapter 12, “Working with Filters in Data Queries,” on page 63
n Chapter 13, “Working with Joins in Data Queries,” on page 67
Add a Table
To add a table to a data query, use the SAS Folders tree to locate the table ( )
and then drag and drop the table onto the workspace.
46 Chapter 9 / Creating Data Queries
TIP You can also click and search for the table by name and location.
Add a Subquery
After you have created a data query and saved it, it can be used as an input
data source to another data query. To add a subquery, use the SAS Folders tree
to locate the data query ( ), and then drag and drop the data query onto the
workspace.
The subquery is represented in the workspace by the columns that are selected
for output in the subquery.
See Also
“Specifying Properties for a Source Table” on page 50
48 Chapter 9 / Creating Data Queries
49
10
Working with Tables in Data Queries
Source Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Specifying Properties for a Source Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Output Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
About Output Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Specify an Output Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Staging Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
About Staging Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Specify a Staging Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Output and Staging Table Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Create SQL Query Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Source Tables
When you drop a table onto the workspace, the data builder connects to the
SAS Metadata Server to determine the column names and data types for the
table. When you drop a subquery onto the workspace, the data builder makes
the same request, but determines the column names and data types for the
output table of the subquery.
You (or an administrator) must register a table in metadata before using it as a
source table for data preparation. When you import data from a file, a database,
Facebook, Google Analytics, or Twitter, the data builder automatically registers
the data in metadata as a table. Source tables can also be registered using SAS
Visual Analytics Administrator or SAS Management Console.
See Also
n “Adding a Data Source” on page 45
n SAS Visual Analytics: Administration Guide
n SAS Intelligence Platform: Data Administration Guide
50 Chapter 10 / Working with Tables in Data Queries
See Also
“Use the Auto-Aggregate Functions” on page 59
Output Tables
Action How To
Change the name of the output table. * Enter the new name in the Table field,
and save the data query. All data queries,
reports, explorations, and so on, still
reference the same table object.
Create a new output table. * Click Clear, and then specify a table
name, location, and library. This action
disassociates the previously used output
table.
Reuse an existing table. Click , and then browse for the table to
use. This action disassociates the
previously used output table.
* If you replace the default table name, OutputTable, with another name before you save the data query, the
data builder registers a new output table and uses it with the data query.
You can enter a name that is up to 32 characters as the output table name. If a
third-party vendor database product is used for the output table, then the
number of characters might be less.
If you select a SAS LASR Analytic Server or SASHDAT library, the Partition by
menu becomes available.
Staging Tables
2 Specify a library.
Note: The data builder is initially configured to use the Visual Analytics
Public LASR library and the Visual Analytics Public HDFS pair of libraries. If
you specify different libraries, then make sure that you understand how the
path is related to the server tag for the SAS LASR Analytic Server library. For
more information, see SAS Visual Analytics: Administration Guide.
* The SAS or DBMS value represents data stored in SAS data sets or a third-party vendor database,
respectively.
** Appending data is performed by the SAS LASR Analytic Server engine. Appends are not performed by
having the server read data in parallel.
The information about appending data in the previous table applies to data
queries. See “Append In-Memory Tables” on page 79 if you are working with
in-memory tables on SAS LASR Analytic Server exclusively.
See Also
Chapter 15, “Working with SAS LASR Analytic Server,” on page 77
SAS LASR Analytic Server or SASHDAT These libraries types do not support
views. Selecting the check box applies to
the work table, rather than the output
table or staging table.
If the source tables and the output tables
are in the same SAS LASR Analytic
Server library, then the check box is not
enabled, and the work table must be a
physical table.
Note: In some cases, the check box is enabled, but using this option can result
in an error when running the data query. For example, if you use a DBMS library
for the output table, you must have permission to create a view. You can clear
the check box to create the output table as a physical table in these cases.
55
11
Working with Columns in Data
Queries
Adding Columns to a Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Remove Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Specify a Column Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Specify Aggregations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Remove All Aggregations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Use Group By Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Use the Auto-Aggregate Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Use the Pivot By Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Icon Description
You can add columns to the data query in the following ways:
n Select the table in the workspace, right-click, and select Add All Columns.
n To add one column from a table, select the column name with your pointer.
TIP If you select the column name an additional time, then the column is
added to the data query again. This can be helpful if you want to use a
column for both numeric and character data. When you add a column
more than once, a number is added to the column name. If you change the
column name, then you must make sure that you do not have more than
one column with the same name.
n To create a new column, click the Column Editor tab, and then click next
to the last column that is listed. Enter a column name, expression, and type.
The remaining fields are optional.
Remove Columns
To remove a column from a data query:
3 Click to open the expression builder. The table name and column name
are added automatically as the default SQL expression.
The expression is limited to 1024 characters.
4 On the Fields tab, select columns from the source tables that you have
added to the data query.
5 On the Functions tab, select the functions to apply to the source column.
Note: If you click after you click Apply, then your last change to the
expression is undone. However, because the expression window is closed, you
might not notice the undo.
Specify Aggregations
To specify an aggregation for a column:
1 On the Column Editor tab, place your pointer in the Aggregations cell for
the column and click. Click the ellipsis button to select the aggregations to
use.
3 Select the check boxes for the aggregate functions to use. Click Apply.
Note: After you click Apply, all of the other columns are automatically
specified as GROUP BY columns. You can change a column from GROUP BY
to an aggregate function by repeating this step for the column.
58 Chapter 11 / Working with Columns in Data Queries
TIP This menu option is available only when all of the columns are
selected and at least one aggregation is defined.
4 Select the check boxes for the aggregate functions that you want to apply,
and then click Apply.
Whenever you add a column to the data query, the selected aggregate functions
are automatically applied.
1 On the Column Editor tab, place your pointer in the Pivot By cell for the
column to use as the pivot column. Click the ellipsis button to select the pivot
column and values.
2 In the Pivot Values dialog box, select the pivot by column. You can enter
search criteria in Filter fields to filter the column names.
60 Chapter 11 / Working with Columns in Data Queries
3 After the unique values for the column are loaded, select the check boxes for
the values to use in the summarization. Click Apply.
The following display shows an example of the Column Editor tab when a pivot
by column is used. The minimum and maximum Total_Retail_Price are
calculated for each Customer_ID and are then pivoted by (transposed by) three
values of the Product_Category column.
TIP TRP is specified as the label for the Total_Retail_Price column. Look at
the next display to see how the label is used to create labels for the new
columns.
The following display shows how pivoting the Customer_ID column by three
values of the Product_Category column results in additional output columns. A
substring of the pivot by values is used as a prefix to each column name and the
Use the Pivot By Feature 61
aggregate function is used as a suffix. The pivot by column label and aggregate
function are used in the output column label.
12
Working with Filters in Data Queries
About Filtering Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Specify a WHERE Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Specify a HAVING Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Best Practices for Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2 On the Fields tab, expand the table node, and select the column to use for
filtering data.
TIP You can enter a value in the Filter fields field to locate the column.
3 Double-click the column or drag and drop it in the SQL expression area.
4 For character variables, you can click column_name Values to view the
values for the column. In the Filter Values window, select the values that you
want to include in the filter.
Click Apply to add the filter values to the SQL expression area.
64 Chapter 12 / Working with Filters in Data Queries
5 (Optional) You can click the Functions tab and select the functions to use
with filtering.
6 (Optional) You can add a subquery to the filter using a table from a different
library. On the Libraries tab, click to add a library.
After you select a library, expand the library node, and select the table that
you want to use for the subquery.
Note: In the SQL expression, you must enclose the subquery in
parentheses.
A single character value Add an equal sign between the CARS.Make = 'Acura'
column name and the unique
value.
2 On the Fields tab, expand the table node, and select the column to use for
filtering data. The Output Columns node includes the calculated columns.
TIP You can enter a value in the Filter fields field to locate the column.
3 Double-click the column or drag and drop it in the SQL expression area.
4 For character variables, you can click column_name Values to view the
values for the column. In the Filter Values window, select the values that you
want to include in the filter.
Click Apply to add the unique values to the SQL expression area.
5 (Optional) You can click the Functions tab and select the functions to use
with filtering.
Best Practices for Filters 65
6 (Optional) You can add a subquery to the filter using a table from a different
library. On the Libraries tab, click to add a library.
After you select a library, expand the library node, and select the table that
you want to use for the subquery.
Note: In the SQL expression, you must enclose the subquery in
parentheses.
7 Edit the HAVING clause in the SQL expression. The syntax is identical to
that shown in step 6 of “Specify a WHERE Clause”.
For more information about editing code manually, see Chapter 18,
“Customizing Code,” on page 89.
66 Chapter 12 / Working with Filters in Data Queries
67
13
Working with Joins in Data Queries
About Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
How Does the Automatic Join Feature Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Feature Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Using Foreign and Primary Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Matching by Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Selecting the Join Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Adding a Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Drag and Drop Join Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Use the Joins Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Example: Joins with a Junction Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Remove a Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Managing Joins in a Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Best Practices for Managing Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
About Joins
SAS Visual Data Builder supports joins for tables and subqueries. You can join
tables to each other, including self joins. You can join subqueries to tables and
join subqueries to subqueries. When you use a subquery in a join, the join
condition is made against the output table for the subquery. The data builder
supports joining up to 256 tables.
When you drop a table or subquery onto the workspace, the data builder
attempts to determine a join condition automatically. When the data builder
creates a join automatically using foreign keys or by matching columns, the join
is added as an inner join. The data builder also supports left, right, and full joins.
You must specify the join type manually if you do not want an inner join.
In addition to easily adding joins to a data query, the data builder generates an
SQL statement with all of the joins declared explicitly. For example, you can
specify an inner join in a WHERE clause, such as WHERE
t1.order_id=t2.order_id. However, mixing inner joins in a WHERE clause
and outer join types in a single data query can be complex to read and
understand.
SAS Visual Data Builder always generates an SQL statement with inner joins
declared explicitly. For example, see the following code sample:
68 Chapter 13 / Working with Joins in Data Queries
LEFT JOIN
LIB1.TRANSACTION_TYPE_DIM TRANSACTION_TYPE_DIM
ON CASH_FLOW_FACT.TRANSACTION_TYPE_KEY =
TRANSACTION_TYPE_DIM.TRANSACTION_TYPE_KEY
INNER JOIN
LIB1.TRANSACTION_DIM TRANSACTION_DIM
ON PARTY_DIM.SEGMENT_ID = TRANSACTION_DIM.SEGMENT_ID
AND PARTY_DIM.TRANSACTION_KEY = TRANSACTION_DIM.TRANSACTION_KEY
Feature Overview
SAS Visual Data Builder attempts to join tables and data queries automatically
as you add them to the workspace. When you drag and drop a table or data
query onto the workspace, information about the table or data query is retrieved
from the SAS Metadata Server. For subqueries, the metadata for the subqueries’
output table is retrieved.
Matching by Name
If there is no foreign key or primary key information for the table that is dragged
and dropped onto the workspace, then the data builder does not use foreign key
or primary key information for the tables already in the workspace.
The data builder retrieves the column information for all of the columns in the
newly added table. The data builder then iterates over each of the tables that are
already in the workspace in the same sequence in which they were added to the
workspace. The data builder compares the length, type, and name for each
column with each column in the newly added table. If a match is found, then the
tables are used in the join, and the columns are added as a join condition. The
data builder does not continue to search for matches between the two tables,
and it does not continue iterating over the tables that are already in the
workspace.
Adding a Join 69
1 If the column for the existing table is not nullable but the column for the newly
added table is nullable, then the tables use a left join.
2 If the column for the existing table is nullable but the column for the newly
added table is not nullable, then the tables use a right join.
3 If both columns for the existing table and newly added table are nullable,
then the tables use a full join.
4 If none of the previous conditions are met, then the tables use an inner join.
You can specify the join type by right-clicking on the join icon ( ) and selecting
the join type from the menu.
Adding a Join
1 Place your pointer on one of the columns in a table to use, and then click and
drag your pointer to a column in the other table to use in the join.
2 If you want a join type other than an inner join, then select the join, right-click,
and select the join type.
TIP The first table that is added to the workspace is always set as the left
table. You can switch the right table and left table by using the Joins tab.
2 Click .
3 Use the menus to replace Not Selected with the table names to use in the
join. Click Save.
70 Chapter 13 / Working with Joins in Data Queries
4 The default join type is an inner join. Use the menu in the Join Type column
to select a different join type.
6 Use the menus to replace Not Selected with the column names to use in
the join condition. Click Save.
To retrieve the transaction amount and transaction type from the Entity_Dim
table, it must have a join that uses the Bridge table instead of the first table (fact
table) that was added to the workspace.
To create a join to a junction (or bridge) table:
2 Add the dimension tables, such as the Accounts_Dim table and junction
tables. The data builder attempts to join the tables automatically.
Review the join as follows:
3 Add the tables that use the junction table, such as the Entity_Dim table.
Initially, the data builder attempts to join the tables to the fact table.
Correct the join as follows:
a Select the automatic join to the fact table, right-click, and select Remove
Join Condition.
b Use your pointer to connect the keys from the junction table to the
dimension table.
Remove a Join
You can remove a join by using either of the following methods:
n Select the join in the workspace, right-click, and select Remove Join
Condition.
n Click the Joins tab, select the row in the table, and click .
n switch the left table and right table assignments for a join
n add, remove, and change the columns that are used in the join condition
The Joins tab shows the join condition for the entire data query. Make sure that
you select a row in the upper table to set the columns in the Join conditions
area.
The workspace shows a link between the tables that are used in a join. If you
specify a left join or right join, then the icon reflects which table provides the
bulk of the data. If you rearrange the tables in the workspace (switching the left
72 Chapter 13 / Working with Joins in Data Queries
table and right table), then the icon continues to reflect which table provides
the bulk of the data. In order to change the data relationship, use either of the
following methods:
n Switch the left table and right table by selecting a row from the table, and
clicking .
n Change the join type from left to right or from right to left.
14
Creating LASR Star Schemas
What is a LASR Star Schema? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Create a LASR Star Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
How Are Tables Used? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Input Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Column Prefixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Output Table and Conserving Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
n A LASR Star Schema is limited to a single join condition. It does not support
multiple key columns between fact and dimension tables.
2 Drag and drop tables or data queries from the SAS Folders tree onto the
workspace. Keep the following suggestions in mind:
74 Chapter 14 / Creating LASR Star Schemas
n Drag and drop the fact table first and then the dimension tables.
n Any input tables that are not already in a SAS LASR Analytic Server
library are loaded to memory when the star schema is run.
n If a dimension table shows the icon, then it usually indicates that the
data builder could not determine the join condition for the dimension
table. Position your pointer over the icon for information about how to
correct the incomplete table status.
n If a dimension table shows the icon, then it usually indicates that the
table is from a different SAS LASR Analytic Server library than the output
table. You must use one SAS LASR Analytic Server library only.
3 (Optional) If you do not want a column from the dimension table in the output
table, then select the column in the table in the workspace, right-click, and
select Remove Column.
Note: All of the columns from the fact table are automatically selected and
required to be included in the output table.
4 (Optional) Click the Joins tab to review the columns that are used to
generate the output table.
6 Click the Output tab, and specify a name for the output table.
7 Click , and specify a name and location for the LASR star schema.
Input Tables
The fact table and dimension tables are used in the star schema after you drag
and drop them onto the workspace. By default, the data builder considers the
first table that you drop in the workspace as the fact table. Click from the
toolbar to select a different fact table.
Because the star schema is formed in memory by the server, the first step is to
make sure that the tables are loaded to memory. Be aware that the tables are
transferred each time the star schema runs and this can reduce performance.
Conversely, if the tables are already loaded to memory on the server, the star
schema runs and generates the output faster.
When creating a star schema using tables from the same SASHDAT library, the
star schema will fail to run if one or more of the tables in the star schema is
encrypted, but the SASHDAT library is not encrypted. In this case, you will
receive an error message indicating that a password is needed for the encrypted
tables. This can occur when your administrator turns encryption off for a
previously encrypted library. Any table that was in the library beforehand will
How Are Tables Used? 75
remain encrypted. Your administrator can resolve the issue by turning encryption
back on for the library. Contact your administrator for more information.
Column Prefixes
The first 15 characters of a dimension table’s name and the underscore
character are initially set as a prefix for the column names from the dimension
table. Column names for the output table are a combination of the prefix and the
original column name.
However, you can specify a different value for the prefix after you select the
table name from the menu at the top of the Inputs tab.
Column names from the fact table are not modified with a prefix.
Performance Considerations
Creating a LASR star schema as a view can be more convenient than creating a
table, but accessing data through the view can impact performance negatively.
The scale of the impact depends on the size of the dimension tables. However,
the number of passes through the data is even more important. For example,
requesting percentiles or box plots or fitting statistical models requires passing
76 Chapter 14 / Creating LASR Star Schemas
through the data multiple times. These requests are impacted more than a
request for summary statistics.
Keep the following considerations in mind:
n The initial creation of a view is faster than forming a table. However,
accessing the data in a view is slower than accessing the data from a table.
n Creating a table requires more physical memory than creating a view. If your
system has sufficient memory capacity, then creating a table provides the
best performance for accessing the data.
77
15
Working with SAS LASR Analytic
Server
Using SAS LASR Analytic Server Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Default Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Input Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Output Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Load a Table (As Is) to SAS LASR Analytic Server . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Appending In-Memory Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
How Does Appending In-Memory Tables Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Append In-Memory Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
How Are Tables Used? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Delete Table Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Distributed Server: Using SASHDAT Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Default Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Staging Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Output Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Distributed Server: Save an In-Memory Table to SASHDAT . . . . . . . . . . . . . . . . . . 82
Distributed Server: Legacy Co-located Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Distributed Server: Partition Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Monitoring Memory Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Default Library
During installation, the SAS Deployment Wizard registers a predefined library for
SAS LASR Analytic Server. This library is available for use in the SAS Folders
tree, and it is located in /Shared Data/SAS Visual Analytics/Public/
Visual Analytics Public LASR.
This library is intentionally configured as a general-purpose library with
extremely limited restrictions for securing data access.
78 Chapter 15 / Working with SAS LASR Analytic Server
Input Libraries
When you select a SAS LASR Analytic Server table as an input table for a data
query, be aware of the following best practices if the table is large. If the table is
not large, then using it for input requires no special considerations.
Here are the considerations for using a large SAS LASR Analytic Server table as
an input table:
n A WHERE clause is processed in memory by the server if no aggregations or
joins are used. Specify a filter on the Where tab so that you use only the
rows that you want.
n Instead of using a data query (which transfers the data from the server to the
SAS Workspace Server and then performs the join), you can create a LASR
star schema. The LASR star schema performs the join in memory with other
in-memory tables.
Output Libraries
A SAS LASR Analytic Server library is initially configured as the default output
library. When you run a data query, click Explore Results to explore the
table immediately.
You can select the Append data check box on the Properties tab to add rows
to an in-memory table. However, this option is not available if you use a
SASHDAT library as a staging library. Instead, you can use the data query to
append rows, and then save the in-memory table as a SASHDAT table.
TIP You can also click , and search for the table by name and location.
Field Description
4 Click OK.
2 Select the table that you want to append data to from the Available tables
list, and click to move it to the Base table field.
If the table that you want to use is not listed, click to view a different
source library. If a table is added to the library after you click , then the list
does not automatically refresh to show the new table. Select the same library
again to refresh its contents.
80 Chapter 15 / Working with SAS LASR Analytic Server
3 Add tables to the Source tables list. These are the tables that have the rows
to append to the base table.
4 (Optional) If you select the Unload source tables after appending them to
the base table check box, then the source tables are dropped from memory
after the append completes.
Select this option only if you do not want to access the source tables
individually.
Note: If an administrator reloads the base table, any data that you previously
appended to the table will not be saved. The base table will go back to its
original content and size.
Note: If the append fails and you get an error message that says that the file is
read-only, in some cases it could mean that your administrator has indicated the
fullcopyto= option for the table. You cannot append to a table that includes
this option. Contact your administrator for more information.
Conserving Memory
After you append the source tables, the base table grows to accommodate the
additional rows. This consumes memory on the SAS LASR Analytic Server.
If you do not need to access the source tables after appending them, then you
can select the Unload source tables after appending them to the base table
check box. This option conserves memory, but you must ensure that the source
tables are loaded to memory again (often with newer data) before you can run
the append again.
Note: If the Delete option on the drop-down menu is grayed out, it means that
you do not have permission to delete the metadata for the table.
Default Library
When your deployment uses Hadoop as a co-located HDFS or NFS-mounted
MapR, the SAS Deployment Wizard registers a predefined library for it. This
library is available for use in the SAS Folders tree, and it is located in /Shared
Data/SAS Visual Analytics/Public/Visual Analytics Public HDFS.
Staging Library
You can specify a SASHDAT library as a staging library. This is a common use
because the rows for the output table are distributed among the machines in the
cluster. The server can then read the data in parallel when it loads the table to
memory.
You must specify a SAS LASR Analytic Server library for the output library when
you use a SASHDAT library for staging.
82 Chapter 15 / Working with SAS LASR Analytic Server
Output Library
You can specify a SASHDAT library as an output library. The engine distributes
the rows for the table to the machines in the cluster. Afterward, you can select
the table from the SAS Folders tree, right-click, and select Load a Table. This
menu option loads the table to memory on a SAS LASR Analytic Server.
You can partition SASHDAT tables when they are used in an output library. You
can select a column to use from the Partition by menu. Partitioning the table
ensures that all of the rows with the same formatted value as the selected
column are distributed to one machine in the cluster. The rows are also placed in
the same block. When you load a partitioned table to memory, the partitioning
information is retained, and the result is a partitioned in-memory table.
See Also
“Distributed Server: Partition Tables” on page 83
Restrictions
The following restrictions apply to using SASHDAT libraries with SAS Visual
Data Builder:
n You cannot specify a SASHDAT library as an input library because the
SASHDAT engine is a Write-only engine.
n The Append data check box on the Properties tab is disabled. The
SASHDAT engine does not support appending data.
n If you specify a SASHDAT library as an output library, you cannot view the
results on the Results tab because the SASHDAT engine is a Write-only
engine.
2 Next to the Name field, click to select the SAS LASR Analytic Server
table.
Note: The table is saved with the user ID of the user that started the SAS LASR
Analytic Server.
and SASHDAT libraries and can improve performance once the data is in
memory.
When you specify a partition key, avoid using a variable that has few unique
values. For example, partitioning by a flag column that is Boolean results in all
rows on two machines because only two values are available. At the other end
of the spectrum, partitioning large tables by a nearly unique key results in many
partitions that have few rows.
Determining the optimal partition key can be a challenging task. However, as an
example, if you tend to access data based on a customer ID, then you might
improve performance by partitioning the data by customer.
See Also
SAS LASR Analytic Server: Reference Guide
In some deployments with limited network bandwidth, the data builder cannot
communicate with the SAS LASR Analytic Server monitor, and the memory
gauge fails to appear.
See Also
SAS Visual Analytics: Administration Guide
85
16
Importing SAS Information Maps
About SAS Information Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Import a SAS Information Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Limitations and Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
See Also
Base SAS Guide to Information Maps
The business logic is imported from the map and represented as an SQL query
on the Code tab.
86 Chapter 16 / Importing SAS Information Maps
TIP If you want to join a table, then save the data query, create a new data
query, and add it as a subquery.
See Also
Chapter 18, “Customizing Code,” on page 89
17
Supporting Text Analysis
Features Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Load a Stop List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Add a Unique Numeric Key to a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Features Overview
SAS Visual Analytics can perform text analysis with the explorer. To enable text
analysis, perform the following data administration tasks with the data builder:
n Load a stop list to filter out commonly used words.
n Acquire Twitter data to analyze tweet trends. For more information about
Twitter, see Chapter 6, “Importing Data from Other Sources,” on page 31.
2 Make changes to the location and library if necessary. Each stop list must be
stored in its own metadata folder.
A table named ENGSTOPL or GRMSTOPL is registered in the location and
library that you specified.
3 Click OK.
SAS Visual Analytics supports one stop list for each SAS LASR Analytic Server.
You load the stop list (which is a table) to memory by performing the previous
steps. If more than one library is registered for SAS LASR Analytic Server, then
88 Chapter 17 / Supporting Text Analysis
you can use any one of them. If you load a stop list more than once or use more
than one library, then the server uses the last stop list that was loaded to
memory.
2 Add the columns to include in the text analysis by clicking the column name
in the table in the workspace.
3 In the Column Editor, right-click on the first row in the table, and select Add
Generated Key Column.
A column that is named GENERATED_ID is added to the table.
When you run the data query, the GENERATED_ID column begins at zero and
increments for each row in the source table. If you select the Append data
check box on the Properties tab, then the data query increments from the
current maximum value.
If the data that you want to use is already in memory on SAS LASR Analytic
Server, then performing the previous steps results in the following sequence of
data movements:
n The data is read from memory on SAS LASR Analytic Server and transferred
to the SAS Application Server.
n The data query runs and adds the generated key column.
n The data is transferred back to SAS LASR Analytic Server in a new table.
You can avoid these data movements by adding the generated key column
before loading the table to memory on SAS LASR Analytic Server.
89
18
Customizing Code
Use the Code Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Preprocess and Postprocess Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Considerations for Manually Editing Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Before You Manually Edit Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Table and Column Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Input and Output Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Validate Custom Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Any SAS statements that you enter in the Preprocess view or Postprocess
view are included in the All Code view.
1 On the Outputs tab, specify the information for the output table, including the
table name, location, and library. If you do not specify the table name or the
table name is already in use, then you will not be able to save the data query.
3 Save the data query by clicking . When you save the data query, the
metadata for the table is registered. If you do not save the query before
unlocking the code, you will receive empty columns when you run the query.
See Also
SAS Language Interfaces to Metadata
See Also
n SAS Statements: Reference
n SAS/ACCESS for Relational Databases: Reference
If you unlock the code in the All Code view, then the button is disabled. You
cannot validate customized code.
92 Chapter 18 / Customizing Code
93
19
Scheduling
About Scheduling Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
How Does the Scheduling Feature Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Edit Data Queries That Are Already Scheduled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Stop Scheduled Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Caution about Scheduling Data Queries to Run Now . . . . . . . . . . . . . . . . . . . . . . . . 94
Scheduling Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
When Are the Scheduling Preferences Used? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Creating Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Why Use Events? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Create a Time Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Create a File Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Export Data Queries as Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Additional Scheduling Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
You can schedule the data query based on specified conditions (for example,
run immediately or run whenever a trigger condition is met).
The job, deployed job, and deployed flow are metadata objects. The data builder
stores them in the same metadata folder with the data query. The metadata
objects are named based on the following pattern:
vdb_name_timestamp
Note: Up to 42 characters from the data query name are used as the name.
94 Chapter 19 / Scheduling
When the specified conditions are met, the data query is run with the user ID
that scheduled it. This is the behavior for the Operating System Services
Scheduler.
3 Select the trigger that you want to delete, and then click Delete.
4 If you deleted the last trigger in the list, you must perform one of the following
steps in order to proceed:
n Create a new trigger by clicking New Time Event.
5 Click OK.
7 Click to run.
Note: If you deleted all of the triggers and then selected Run now, the
scheduled data query no longer runs but it will still exist in the SAS Management
Console. To permanently delete the scheduled data query, you must use the
SAS Management Console. For more information, see the Deleting Jobs and
Flows topic in Scheduling in SAS.
These steps result in an error condition because SAS unlocks a SAS data set
when it is opened for reading. When step 3 is performed, the output table is
About Scheduling Data Queries 95
locked, and no other process can overwrite the output table. The following
message is included in the SAS log:
You can avoid this error condition. If you want to schedule the data query to run
now, then close it, open it again, and schedule it to run now. Alternatively, you
can schedule the data query to run in the future and then close the data query.
Scheduling Preferences
If you have multiple server contexts and each context has its own batch servers,
then you should specify in preferences the servers that you want to use.
Creating Events
Note: You can specify multiple time events. However, the Operating System
Services Scheduler (the default scheduler) can use only one of the time
events.
n File events are evaluated based on the state of a specified file.
Creating Events 97
You can create file events if your deployment includes a scheduling server that
supports them, and the flow is deployed to that scheduling server. Time and file
events can be used as triggers (conditions that must be met in order to run a
flow on the scheduling server).
1 In the Schedule window, select Select one or more triggers for this data
query, and then click New Time Event.
2 In the New Time Event window, specify whether the time event should
happen one time only or more than once. If the time event should happen
one time only, then specify the date and time for the time event.
3 If the time event should happen more than once, then select More than
once and then select a radio button for how often the time event should
repeat (such as hourly, weekly, or yearly).
4 Specify the details of when the time event should repeat. The specific fields
that are available depend on the recurrence interval that you select.
If you select Hourly, then the time is calculated from hour zero on a 24-hour
clock. For example, if you leave Interval hour set to 1, then the data query
runs at hour zero (midnight), and runs each hour. If you set Interval hour to
2, then the data query runs every other hour, and the Offset hour specifies
whether to run on the even hours (when set to 0) or on the odd hours (when
set to 1). In this case, the Offset hour specifies the offset from hour zero
(midnight).
If the recurrence interval requires you to select start times, then use the
Hours and Minutes check boxes to select the times. The Minutes area
contains groupings of 10-minute intervals. Selecting a check box for a minute
grouping selects all of the minutes in that grouping.
TIP The following display is available after selecting More than once and
then Daily on the New Time Event window.
If you select multiple values for Hours, then all of the selections for Minutes
apply to all of the selected values. For example, if you select 19:00 (07:00
PM) and 22:00 (10:00 PM) for Hours, and 43 for Minutes, then the time
event is scheduled for 19:43 and 22:43.
6 If needed, specify the start date and end date for the time event. The default
is to start at the current date and time and not to have an end date.
1 In the Schedule window, select Select one or more triggers for this data
query, and then click New File Event.
Additional Scheduling Resources 99
2 In the New File Event window, specify or select the file to use for the file
event.
3 Select the condition to evaluate the file to make the file event true. For
example, if you selected not exist for the condition, the file event would be
true only if the selected file was not in the specified location.
4 If needed, specify the details (such as size or age) about the condition.
3 In the Export as a Job window, enter a name and specify a location. Click
Export.
setting is lost and you must repeat your steps with the Schedule Manager plug-
in.
See Also
Scheduling in SAS
101
20
Using the Results Tab
About the Results Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Data Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Navigate within the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Filter and Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Export Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Column Headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Data Pages
When you view data, a SAS server retrieves the data from the data set. Instead
of returning all of the data, the data viewer requests a page of data. You can set
the page size to between 20 and 2000 rows.
A slider is provided at the bottom of the Results tab so that you can navigate
through the pages and browse the entire data set.
102 Chapter 20 / Using the Results Tab
Find
Search for text or numbers in the data set by clicking , typing in the Find field,
and pressing Enter. The find feature searches through the rows in the data set
for the value, and it highlights the first row with the value. You can navigate
through the results by clicking Find next and Find previous.
Export Data
You can save the data that you view as a comma-separated values file. After
you click , you can choose to export the rows on the current data page, all of
the rows, or a range of rows. The export feature has a limit of exporting 200,000
rows.
If you choose to export all of the data or a range of rows, then you must click
Retrieve Data before you can click Export as CSV.
Column Headings
Use the Headings menu to control the appearance of the column headings. You
can view the column name from the data set, the column label from the data set,
or a combination of the two. If a column does not have a label in the data set,
then the column name is used.
104 Chapter 20 / Using the Results Tab
105
Part 4
Exploring Data
Chapter 21
Overview of SAS Visual Analytics Explorer . . . . . . . . . . . . . . . . . . . . . . . . . 107
Chapter 22
Specifying Preferences for SAS Visual Analytics Explorer . . . . . . . . . . . . 111
Chapter 23
Managing Explorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Chapter 24
Managing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Chapter 25
Working with Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Chapter 26
Working with Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Chapter 27
Exporting Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Chapter 28
Managing Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Chapter 29
Performing Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
106
Chapter 30
Sharing Comments in the Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
107
21
Overview of SAS Visual Analytics
Explorer
What Is SAS Visual Analytics Explorer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
The Welcome Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Overview of the Welcome Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Create a New Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Open an Existing Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Your First Look at the Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Manage Tabs in the Right Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
1 The application bar enables you to return to the home page and to access
other parts of SAS Visual Analytics and other SAS applications that integrate
with the home page. You can access your recently created or viewed reports,
explorations, stored processes, data queries, or other objects in your recent
history. Buttons are displayed for each open application.
2 The menu bar offers common tasks, such as creating a new exploration.
3 The toolbar enables you to manage your explorations and visualizations.
4 The Data pane enables you to manage the data that is used in your
visualizations.
5 The data properties table enables you to set data item properties.
6 The workspace displays one or more visualizations.
110 Chapter 21 / Overview of SAS Visual Analytics Explorer
7 The right pane’s tabs enable you to set properties and data roles, create
filters and ranks, set global parameter values, and use comments.
8 The dock contains any minimized visualizations.
To display the full label name for each tab, select the drop-down list, and then
deselect Show icons only.
You can reorder the tabs in the right pane by dragging and dropping them.
111
22
Specifying Preferences for SAS
Visual Analytics Explorer
Specify Global Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Specify Your Preferences for the Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
3 Select the default Map provider mode for geographic maps. The map
provider creates the background map for geo maps and for network
diagrams that display a map.
Note: You can change the map provider for an individual visualization by
editing the Map service value on the Properties tab.
4 If your Map provider mode is Esri, then you must select the specific Esri
map service that you want to use.
6 Select a Graph skin to change the visual effects that are applied to your
graphs. For example, many of the Graph skin settings apply lighting effects
to the features of your graph to create a 3-D appearance.
Note: A high value for Visualization data threshold might degrade your
application performance or lead to time-out errors.
23
Managing Explorations
What Is an Exploration? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Create a New Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Save Your Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Delete Explorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
What Is an Exploration?
An exploration (sometimes called a visual exploration) is a metadata object that
contains all of the visualizations and data settings from a SAS Visual Analytics
Explorer (the explorer) session. You can use explorations to save your session
for later and to share it with others.
Delete Explorations
To delete an exploration, use the SAS Visual Analytics home page. See
“Manage Content on the Classic Home Page” on page 618.
114 Chapter 23 / Managing Explorations
115
24
Managing Data
Managing Data Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Overview of Managing Data Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Manage Data Properties for Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Select a Numeric Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Select a Date or Time Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Show and Hide Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Sort Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Group Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Assigning Colors for Category Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Add Additional Data Sources to Your Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Replace a Data Source in Your Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Remove a Data Source from Your Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Refresh Your Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Creating Custom Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
About Custom Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Create a Custom Category for a Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Create a Custom Category for a Category or a Date . . . . . . . . . . . . . . . . . . . . . . . 122
Working with Global Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
About Global Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Create a Global Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Set the Value for a Global Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Edit a Global Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Delete a Global Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Creating Calculated Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
About Calculated Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Create a Calculated Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Creating Aggregated Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
About Aggregated Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Create an Aggregated Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Support for Aggregated Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Creating Derived Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
About Derived Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Derived Item Types for Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Derived Item Types for Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Create a Derived Item for a Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Create a Derived Item for a Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
116 Chapter 24 / Managing Data
1 In the Data Properties window or in the property table in the Data pane, click
the format for the data item. A window appears.
3 Specify the Width parameter for the format. The width of the format specifies
the maximum number of characters that a value can contain, including
decimal points.
A preview of your format appears in the Sample field.
4 Specify the number of Decimals for the format. The Decimals value
specifies the number of digits that appear to the right of the decimal place.
A preview of your format appears in the Sample field.
1 In the Data Properties window or in the property table in the Data pane, click
the format for the data item. A window appears.
3 If necessary, select a more specific format from the Sample list. The format
names also represent sample values for the format.
118 Chapter 24 / Managing Data
Note: You can restore the default format by clicking Reset to Default.
Note: Time and datetime values in the explorer ignore daylight-saving time.
1 Select Data Show or Hide Items from the menu bar. The Show or Hide
Items window appears.
2 Click Select All to select or deselect all of the data items, or click the check
box beside each data item to select whether that data item is shown.
By Aggregation
groups measures by the default aggregation.
Note: The default grouping is By Classification.
About Colors
By default, the explorer assigns colors dynamically to category values for
grouped visualizations. You can assign specific colors to your category values to
ensure that the category values are always represented by a specific color.
Because the same assigned colors are used in every visualization, you can
easily compare values between visualizations.
1 Right-click on a category from the Data pane, and then select Colors. A
color selection window appears.
2 For each category value to which you want to assign a color, select the value
from the Choose drop-down list, and then click the color box to select a
color. Click Apply to save your selection.
1 Right-click on a category from the Data pane, and then select Colors. A
color selection window appears.
2 Click Reset all to clear all of the color assignments for the category.
3 Click OK to apply the new color. This color value is used consistently for the
selected category value in all of your visualizations.
120 Chapter 24 / Managing Data
1 In the Data pane, select the data source that you want to replace from the
drop-down list.
3 In the Change Data Source window, select or import the data source that you
want to use.
Note: If any data items in the previous data source do not exist in the new
data source, then a message appears. Any data items that do not exist in the
new data source are removed from your exploration. Any filters, ranks, or
calculated items that are based on the removed data items are also
removed.
1 On the Data pane, select the data source that you want to delete from the
drop-down list.
Note: You cannot delete the last remaining data source from an exploration.
Note: Any visualizations, filters, ranks, or calculated items that are based on
the deleted data source are removed from your exploration.
2 Select the measure that you want to use for the custom category.
a As needed, click New label to add a new label group to the custom
category.
b For each label group, click the label group heading (for example, Label1)
to specify the label text.
Note: The label text must use characters that are compatible with the
locale of the data source. If the data source uses Unicode, then your
labels can contain characters from any locale.
c For each label group, specify the values that are associated with the
label:
n For intervals, select and specify the minimum and maximum
values for the interval.
n For distinct values, drag and drop values from the Values list onto the
label group.
7 Click OK. The new custom category is displayed in the Data pane.
2 Select the category or date that you want to use for the custom category.
a As needed, click New label to add a new label group to the custom
category.
b For each label group, click the label group heading (for example, Label1)
to specify the label text.
Note: The label text must use characters that are compatible with the
locale of the data source. If the data source uses Unicode, then your
labels can contain characters from any locale.
c For each label group, specify the values that are associated with the
label.
Drag and drop values from the Values list onto the label group.
6 Click OK. The new custom category is displayed in the Data pane.
1 In the expression editor, right-click the Parameter heading in the Data Items
list, and then select Create Parameter.
3 Specify the Type for the parameter. You can select either Numeric or
Character.
4 For character parameters, specify the Current value for the parameter.
For numeric parameters, specify the following:
Minimum value
specifies the minimum possible value for the parameter.
Maximum value
specifies the maximum possible value for the parameter.
124 Chapter 24 / Managing Data
Current value
specifies the current value for the parameter.
Format
specifies the data format for the parameter.
6 Finish editing your item. If you close the expression editor window without
saving, then your new parameter is not saved.
1 On the Parameters tab, select the drop-down list for the parameter, and
then select Edit.
2 For character parameters, specify the Current value for the parameter.
For numeric parameters, specify the following:
Minimum value
specifies the minimum possible value for the parameter.
Maximum value
specifies the maximum possible value for the parameter.
Current value
specifies the current value for the parameter.
Format
specifies the data format for the parameter.
2 In the Data Items list, right-click the parameter that you want to delete, and
then select Delete Parameter.
Note: You can delete a global parameter only if it is not used by any filters,
calculated items, or aggregated measures.
Note: If you close the expression editor window without saving, then the
parameter is not deleted.
1 Select Data New Calculated Item. The New Calculated Item window
appears.
3 Select the data type for the calculated data item from the Result type drop-
down list.
Note: The data type is updated automatically based on the outermost
operator of your expression.
4 Build the expression for your calculated data item by dragging and dropping
data items, global parameters, and operators onto the expression in the right
pane. For each field in the expression, you can insert a data item, a global
parameter, an operator, or a specific value.
Note: You can double-click a data item in the Data Items pane to add it to
the first available parameter in the expression.
Note: Aggregated data items and derived data items are not supported for
calculation expressions.
When you drag and drop data items, global parameters, and operators onto
the expression, the precise location of the cursor determines where and how
the new element is added to the expression. As you drag the new element
over the expression, a preview appears, which displays how the expression
would change if you drop the element at the current location.
For example, if your current expression is ( Profit / Revenue ), and you
drag the x - y (subtract) operator over the open parenthesis symbol, then
the expression changes to ( [number] – ( Profit / Revenue )). If
126 Chapter 24 / Managing Data
you drag the operator over the division symbol, then the expression changes
to ( Profit – Revenue ).
There are a large number of operator types available to perform
mathematical functions, process datetime values, and evaluate logical
processing such as IF clauses. See Appendix 5, “Operators for Data
Expressions,” on page 575.
Note: You can also edit your expression as text. See “Editing a Data
Expression in Text Mode” on page 569.
5 When you are finished creating your expression, select the Default
aggregation for the calculated data item, and then click Select to choose the
data format.
6 Click Preview to see a preview of the calculated data item as a table. The
table displays the values of the calculated item and any data items that are
part of the calculation expression.
7 Click OK to create the new calculated data item. The new data item appears
in the Data Items pane.
3 Build the expression for your aggregated measure by dragging and dropping
data items, global parameters, and operators onto the expression in the right
pane. For each field in the expression, you can insert a data item, a global
parameter, an operator, or a specific value.
Note: You can create a new calculated item to use in the aggregated
measure expression. Click New Calculated Item to create the new calculate
item.
Creating Aggregated Measures 127
When you drag and drop items, global parameters, and operators onto the
expression, the precise location of the cursor determines where and how the
new element is added to the expression. As you drag the new element over
the expression, a preview appears, which displays how the expression would
change if you drop the element at the current location.
There are a large number of operator types available to perform
mathematical functions and evaluate logical processing such as IF clauses.
See Appendix 5, “Operators for Data Expressions,” on page 575.
Note: You can also edit your expression as text. See “Editing a Data
Expression in Text Mode” on page 569.
6 When you are finished creating your expression, click Select to choose the
data format.
7 Click OK to create the new aggregated measure. The new data item appears
in the Data Items pane.
n Crosstab
n Bar Chart
n Line Chart
n Treemap
n Geo Map
sales for the current month and sales for the same month of the previous
year.
Note: This derived item is not available if your data source does not contain
a date data item that includes the year.
Percent Difference from Previous Period
Displays the percentage difference between the value for the current time
period and the value for the previous time period. For example, you might
derive the percentage difference between sales for the current month and
sales for the previous month.
Note: This derived item is not available if your data source does not contain
a date data item that includes the year.
Percent of Subtotals
For crosstabs only, displays the percentage of the subtotal value for the
measure on which it is based.
You can select whether to calculate the percentage of the subtotal value for
the rows in the crosstab or for the columns in the crosstab.
For example, you might calculate the percentage of the row subtotal value for
a measure that contains revenue values. The derived item displays the
percentage of the subtotal of revenues for each row in the crosstab.
Note: Percent of Subtotals can be created only from within a crosstab
visualization.
Percent of Total
Displays the percentage of the total value for the measure on which it is
based. For example, you might derive the percentage of the total value for a
measure that contains revenue values. If you create a bar chart by using the
derived item and a category that contains products, then the bar chart shows
the percentage of total revenue for each product.
Note: The percentage of the total value is relative to the subset of data that
is selected by your filters and ranks.
Period to Date
Displays the aggregated value for the current time period and all of the
previous time periods within a larger time interval. For example, you might
derive the year-to-date total for each month.
Note: This derived item is not available if your data source does not contain
a date data item that includes the year.
Year over Year Growth
Displays the percentage difference between the current time period and an
equivalent time period from the previous year. For example, you might derive
the difference in sales between the current month and the same month of the
previous year.
Note: This derived item is not available if your data source does not contain
a date data item that includes the year.
Year to Date
Displays the aggregated value for the current time period and all of the
previous time periods within the year. For example, you might derive the
year-to-date total for each month.
The year-to-date calculation subsets the data for each year using today’s
date (where today is evaluated each time you view the exploration). To use
130 Chapter 24 / Managing Data
all data for every period, use a Period to Date item or edit the expression for
the derived item.
Note: This derived item is not available if your data source does not contain
a date data item that includes the year.
Year to Date Growth
Displays the percentage difference between the year-to-date value for the
current time period and the year-to-date value for the same time period of the
previous year. For example, you might derive the difference in year-to-date
sales between the current month and the same month of the previous year.
The year-to-date calculation subsets the data for each year using today’s
date (where today is evaluated each time you view the exploration). To use
all data for every period, use a Period to Date item or edit the expression for
the derived item.
Note: This derived item is not available if your data source does not contain
a date data item that includes the year.
Note: The derived item types that aggregate values over time use periodic
operators. For information about using periodic operators, see “Periodic
Operators” on page 583.
n Crosstab
n Bar Chart
n Line Chart
Editing a Calculated, Aggregated, or Derived Data Item 131
n Network Diagram
n Geo Map
n Treemap
Add an Operator
To add an operator to the expression:
1 From the Operators list, select the operator that you want to add. For a list of
the operators that are available, see Appendix 5, “Operators for Data
Expressions,” on page 575.
3 For any required parameters, select the parameter, and enter a value. Or,
right-click the parameter field, and select Replace with to select a data item
or a global parameter.
Replace an Operator
To replace an operator, drag and drop a new operator onto the existing operator
in the expression. You can also right-click an operator in your expression, and
select Replace Operator with operator.
Subset an Expression
To subset an expression and delete the remainder:
2 Right-click, and select Keep Operand. The parts of the expression that were
not selected are removed.
use the Minimum and Maximum aggregations for a data item in the same
visualization.
Here are the steps to duplicate a data item:
1 Right-click on a measure in the Data pane, and then select Duplicate Data
Item. The New Duplicate Item window appears.
Note: You can also invoke the New Duplicate Item window by dragging and
dropping the same data item onto a visualization more than once.
2 Enter a Name, a Format, and a Default aggregation for the duplicate data
item.
2 Right-click the category, select Geography, and then select the role type.
The role type can be any of the following:
Country or Region Names
specifies countries or regions by name.
Defining a Geography Data Item 135
Latitude
specifies a measure from your current data source that contains the
latitude (Y) coordinate values for the geographic role that you want to
define.
Longitude
specifies a measure from your current data source that contains the
longitude (X) coordinate values for the geographic role that you want to
define.
136 Chapter 24 / Managing Data
Coordinate Space
specifies the coordinate space (coordinate system) that is used to project
the longitude and latitude coordinate values.
1 Specify a data item as the unique row identifier for the exploration. You can
choose a category, a measure, or a calculated item. The unique row identifier
must have a unique value for each row of the data source.
TIP To determine whether the values of a category are unique, assign the
category to a bar chart with no measures. If the frequency of any value is
greater than one, then the category values are not unique. To determine
whether the values of a measure are unique, open the Measure Details
window, and then compare the Total Rows and Distinct Count statistics.
If the statistics are identical, then the measure values are unique.
Right-click the data item in the Data pane, and then select Set as Unique
Row Identifier.
Note: A nonunique row identifier can produce unreliable results.
2 Assign one or more categories to the Document Collection data role. Right-
click a category, and then select Document Collection.
Note: A document collection can be used in your visualizations the same
way a category is used.
137
25
Working with Visualizations
Overview of Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
About Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Visualization Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Working with Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Create a New Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Manage Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Arrange the Visualizations in the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Use the Manage Visualizations Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Display Detailed Data for a Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Change the Data Source for a Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Control Visualization Data Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Manage Visualization Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Managing Visualization Data Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Add a Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Replace a Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Remove a Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Switch Data Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Work with Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Ranking Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Overview of Ranking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Create a New Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Delete a Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Managing Visualization Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Lock an Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Adjust an Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Transfer Axis Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Working with Visualization Data Ranges and Color Gradients . . . . . . . . . . . . . . 153
Support for Customized Data Ranges and Color Gradients . . . . . . . . . . . . . . . . . 153
Specify a Custom Color Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Specify a Custom Data Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Share a Color Gradient and Data Range between Visualizations . . . . . . . . . . . . 154
Remove Customized or Shared Color Data Ranges . . . . . . . . . . . . . . . . . . . . . . . . 155
Working with Data Brushing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Overview of Data Brushing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Enable Data Brushing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
138 Chapter 25 / Working with Visualizations
Overview of Visualizations
About Visualizations
SAS Visual Analytics Explorer (the explorer) displays data by using
visualizations. A visualization is an interactive visual representation of your data.
Visualization Types
You can assign any of the following types to your visualizations:
If SAS Visual Statistics is licensed at your site, then the following modeling
visualizations are available:
n Linear Regression
n Logistic Regression
n Cluster
For more information, see Chapter 33, “Modeling Information,” on page 249.
Manage Visualizations
Delete a Visualization
To delete a visualization, click the button on the visualization, or select
Visualization Delete from the menu bar to delete the selected visualization.
You can delete all of your visualizations by selecting View Delete All
Visualizations.
Duplicate a Visualization
To duplicate a visualization, select Visualization Duplicate from the main
menu, or select the drop-down list from the visualization toolbar, and then
select Duplicate.
Working with Visualizations 147
Maximize a Visualization
To maximize a visualization to fill the entire workspace, click in the
visualization that you want to maximize. To return the visualization to its normal
size, click .
Resize a Visualization
To resize a visualization in your workspace, drag the resizing tab at the
bottom edge or the right edge of the visualization that you want to resize.
The Manage Visualizations window enables you to perform the following tasks:
Task Action
Add visualizations to the selection list. Select a visualization from the Available
(Restore visualizations.) list, and then click , or click to add
all of the available visualizations.
Remove visualizations from the selection Select a visualization from the Selected
list.
list, and then click , or click to
(Minimize visualizations.) remove all of the visualizations.
Change the order of the selected In the Selected list, drag and drop the
visualizations. visualizations in the order that you want,
or select a visualization and click the up
and down arrows to move it.
For an empty visualization with no data items, ranks, or visualization filters, you
can add a data item from any data source. The new data source is assigned to
the visualization automatically.
To change the data source for a visualization that is not empty, follow these
steps:
1 If the data source that you want to use is not part of the exploration, then add
the new data source. See “Add Additional Data Sources to Your Exploration”
on page 120.
2 Select the visualization for which you want to change the data source.
3 Remove any ranks from the Ranks tab and any visualization filters from the
Filters tab.
4 On the Roles tab, remove all data items from the data roles.
5 From the Data source drop-down list, select the data source for the
visualization.
n Drag and drop the data item onto a Measure or Category button in the
visualization to assign the data item to a specific data role.
n From the visualization toolbar, select the drop-down list, and then select
Add Category or Add Measure.
n Use the Roles tab in the right pane. Either drag and drop a data item onto a
role, or expand the drop-down list beside the role and then select a data
item.
Each visualization requires a minimum number of each type of data item. The
following table lists the requirements for each visualization:
n Select the drop-down list from the visualization toolbar, and then select
Remove item-name .
n Right-click on the data item that you want to delete in either the visualization
or on the Roles tab, and then select Remove item-name.
Ranking Data
Overview of Ranking
You can use the Ranks tab to create ranks to subset the data in your
visualizations. A rank selects either the top (greatest) or the bottom (least)
aggregated value for a category.
A rank selects values for a category based on either the frequency of the
category values or the aggregated value of a measure.
For example, you might create a rank of the top 10 countries by frequency to
select the 10 countries that are most represented in your data source. As
152 Chapter 25 / Working with Visualizations
another example, you might create a rank of the top 10 countries by population
to select the 10 countries with the greatest population.
Note: If the category for the rank is part of a hierarchy that is used in the current
visualization, then the rank is applied only when the hierarchy is drilled to the
level of the rank category.
1 From the Data pane, select the data item that you want to use as the base of
the rank. You can select any category or geography data item, regardless of
whether it is assigned to the current visualization.
2 Either right-click on the data item, and select Add as Rank on Visualization,
or drag and drop the data item onto the Ranks tab.
a Select the type of rank from the drop-down list. Top specifies that the
rank selects the greatest value. Bottom specifies that the rank selects the
least value.
b Specify the number of values for the rank. For example, if you specify 5,
and you select Top as the rank type, then the rank selects the five
greatest values.
c From the By drop-down list, select the measure that is used to create the
rank. You can either select any measure, or select Frequency to use the
frequency of the rank category.
Note: If you select a measure that is used in the current visualization,
then the rank uses the same aggregation for the measure that is used by
the current visualization.
Note: Only the Sum, Average, Count, Minimum, and Maximum
aggregation types can be used in a rank.
Note: By default, your rank changes are applied automatically to the current
visualization. To apply multiple changes together, deselect Auto-Update, and
then click Update when you are ready to apply your rank changes.
Working with Visualization Data Ranges and Color Gradients 153
Delete a Rank
To delete a rank, click on the rank on the Ranks tab.
Lock an Axis
By default, the axes of your visualizations adjust automatically to your data. If
you change the data that is displayed by applying filters or ranks or by drilling
down, then the data ranges and scaling of your axes will change to fit the data.
For comparison purposes, you might want to lock the axes and retain the same
data ranges and scaling. To lock an axis, click the icon beside the axis
heading.
To re-enable automatic adjustments for an axis, click the icon beside the axis
heading.
Adjust an Axis
For a locked axis, you can adjust the visible data range. You can adjust the
range by dragging the scroll bar that appears over the axis tick marks or by right-
clicking a measure heading, and then selecting Set Visible Axis Range.
n Network diagram (with the Node Color or Link Color role assigned)
1 Right-click on the color gradient in the legend, and then select Edit Color
Gradient.
2 From the Edit Color Gradient window, select a color gradient from the Color
gradient drop-down list.
1 Right-click on the color gradient in the legend, and then select Configure
Color Gradient.
3 In the Lower field, specify the lower bound for the data range.
4 If the selected color gradient uses three colors, specify the inflection point of
the gradient in the Inflection field, or select Use midpoint to use the
midpoint between the lower and upper values as the inflection point. The
inflection point is the point for the middle color in a three-color gradient.
5 In the Upper field, specify the upper bound for the data range.