0% found this document useful (0 votes)
2K views668 pages

SAS Visual Analytics PDF

Uploaded by

Mad Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views668 pages

SAS Visual Analytics PDF

Uploaded by

Mad Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 668

SAS Visual Analytics

7.3: User’s Guide

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

All Rights Reserved. Produced in the United States of America.


For a hard copy book: No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc.
For a web download or e-book: Your use of this publication shall be governed by the terms established by the vendor at the time you
acquire this publication.
The scanning, uploading, and distribution of this book via the Internet or any other means without the permission of the publisher is illegal and
punishable by law. Please purchase only authorized electronic editions and do not participate in or encourage electronic piracy of copyrighted
materials. Your support of others' rights is appreciated.
U.S. Government License Rights; Restricted Rights: The Software and its documentation is commercial computer software developed at
private expense and is provided with RESTRICTED RIGHTS to the United States Government. Use, duplication, or disclosure of the Software
by the United States Government is subject to the license terms of this Agreement pursuant to, as applicable, FAR 12.212, DFAR
227.7202-1(a), DFAR 227.7202-3(a), and DFAR 227.7202-4, and, to the extent required under U.S. federal law, the minimum restricted rights
as set out in FAR 52.227-19 (DEC 2007). If FAR 52.227-19 is applicable, this provision serves as notice under clause (c) thereof and no other
notice is required to be affixed to the Software or documentation. The Government’s rights in Software and documentation shall be only those
set forth in this Agreement.
SAS Institute Inc., SAS Campus Drive, Cary, NC 27513-2414
October 2016
SAS® and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and
other countries. ® indicates USA registration.
Other brand and product names are trademarks of their respective companies.
7.3-P2:vaug
Contents

Using This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv


What’s New in SAS Visual Analytics 7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix

PART 1 Introduction to SAS Visual Analytics 1

Chapter 1 / About SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


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

Chapter 2 / Accessing SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7


About SAS Visual Analytics Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
Personalize SAS Visual Analytics Using SAS Home . . . . . . . . . . . . . . . . . . . . . . . 11

PART 2 Accessing Data 13

Chapter 3 / Overview of Data Flow in SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


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

Chapter 4 / Importing Local Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19


Import a Local Data File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Limitations and Restrictions for Importing Local Data Files . . . . . . . . . . . . . . . . . 21
Usage Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Chapter 5 / Importing Data from Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25


Import a SAS Data Set on a Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Import a Database Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Database Connection Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
iv Contents

Chapter 6 / Importing Data from Other Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31


Import Data from Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Import Data from Google Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Import Tweets from Twitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

PART 3 Preparing Data 35

Chapter 7 / Overview of SAS Visual Data Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37


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

Chapter 8 / Specifying Preferences for SAS Visual Data Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41


Specifying Global and General Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Specify Your Preferences for the Data Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Chapter 9 / Creating Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43


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
Specifying Properties for a Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Chapter 10 / Working with Tables in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49


Source Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Specifying Properties for a Source Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Output Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Staging Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Output and Staging Table Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Create SQL Query Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Chapter 11 / Working with Columns in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55


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

Chapter 12 / Working with Filters in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63


About Filtering Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Specify a WHERE Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Specify a HAVING Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Best Practices for Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Chapter 13 / Working with Joins in Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67


About Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Contents v

How Does the Automatic Join Feature Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68


Adding a Join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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

Chapter 14 / Creating LASR Star Schemas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73


What is a LASR Star Schema? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Create a LASR Star Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
How Are Tables Used? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Chapter 15 / Working with SAS LASR Analytic Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77


Using SAS LASR Analytic Server Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Load a Table (As Is) to SAS LASR Analytic Server . . . . . . . . . . . . . . . . . . . . . . . . 78
Appending In-Memory Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Delete Table Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Distributed Server: Using SASHDAT Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
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

Chapter 16 / Importing SAS Information Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85


About SAS Information Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Import a SAS Information Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Limitations and Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Chapter 17 / Supporting Text Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87


Features Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Load a Stop List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Add a Unique Numeric Key to a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Chapter 18 / Customizing Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89


Use the Code Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Preprocess and Postprocess Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Considerations for Manually Editing Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

Chapter 19 / Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
About Scheduling Data Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Creating Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Export Data Queries as Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Additional Scheduling Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Chapter 20 / Using the Results Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101


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
vi Contents

PART 4 Exploring Data 105

Chapter 21 / Overview of SAS Visual Analytics Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107


What Is SAS Visual Analytics Explorer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
The Welcome Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Your First Look at the Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Manage Tabs in the Right Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Chapter 22 / Specifying Preferences for SAS Visual Analytics Explorer . . . . . . . . . . . . . . . . . . . . . . 111


Specify Global Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Specify Your Preferences for the Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Chapter 23 / Managing Explorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113


What Is an Exploration? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Create a New Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Save Your Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Delete Explorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

Chapter 24 / Managing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115


Managing Data Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
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
Working with Global Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Creating Calculated Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Creating Aggregated Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Creating Derived Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Editing a Calculated, Aggregated, or Derived Data Item . . . . . . . . . . . . . . . . . . 131
Delete a Calculated, Aggregated, or Derived Data Item . . . . . . . . . . . . . . . . . . . 133
Duplicate a Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Defining a Geography Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Define Data Items for Text Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

Chapter 25 / Working with Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137


Overview of Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Working with Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
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
Work with Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Ranking Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Managing Visualization Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Working with Visualization Data Ranges and Color Gradients . . . . . . . . . . . . . 153
Working with Data Brushing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Working with Automatic Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Working with Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Working with Crosstabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Working with Bar Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Working with Line Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Working with Scatter Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Working with Bubble Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Contents vii

Working with Network Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170


Working with Sankey Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Working with Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Working with Box Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Working with Heat Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Working with Geo Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Working with Treemaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Working with Correlation Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Working with Decision Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Working with Word Clouds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

Chapter 26 / Working with Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201


About Filters in SAS Visual Analytics Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Managing Your Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Working with Basic Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Working with Advanced Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Working with Data Source Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Editing a Filter Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

Chapter 27 / Exporting Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215


Export an Exploration as a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Export an Exploration as a PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Save a Visualization as an Image File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Export Data from a Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
E-mail an Exploration as a Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

Chapter 28 / Managing Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221


What Is a Hierarchy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Create a New Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Derive a Hierarchy from a Date, Time, or Datetime Data Item . . . . . . . . . . . . . 222
Create a Hierarchy from a Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Edit a Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Delete a Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

Chapter 29 / Performing Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225


Overview of Data Analysis in SAS Visual Analytics Explorer . . . . . . . . . . . . . . 225
Add a Fit Line to an Existing Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Add Forecasting to an Existing Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Working with Scenario Analysis and Goal Seeking . . . . . . . . . . . . . . . . . . . . . . . 228

Chapter 30 / Sharing Comments in the Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231


Sharing Comments in the Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

PART 5 Building Models 233

Chapter 31 / Overview of SAS Visual Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235


What Is SAS Visual Statistics? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Benefits of Using SAS Visual Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Specify Global Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Specify Your Preferences for SAS Visual Statistics . . . . . . . . . . . . . . . . . . . . . . . 236

Chapter 32 / Getting Started with SAS Visual Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
viii Contents

Create the Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237


Create a Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Create a Linear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Create a Generalized Linear Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Perform a Model Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

Chapter 33 / Modeling Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249


Available Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Overview of Variables and Interaction Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Variable Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Missing Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Group By Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Filter Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Score Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Derive Predicted Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

Chapter 34 / Linear Regression Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257


Overview of the Linear Regression Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Linear Regression Model Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Working with the Fit Summary Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Working with the Residual Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Working with the Assessment Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Influence Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Fit Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Details Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

Chapter 35 / Logistic Regression Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265


Overview of the Logistic Regression Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Logistic Regression Model Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Working with the Fit Summary Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Working with the Residual Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Working with the Assessment Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Influence Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Fit Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Details Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

Chapter 36 / Generalized Linear Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273


Overview of the Generalized Linear Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Generalized Linear Model Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Working with the Fit Summary Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Working with the Residual Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Working with the Assessment Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Fit Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Details Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

Chapter 37 / Decision Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281


Overview of the Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Decision Tree Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Information Gain and Gain Ratio Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Pruning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Working with the Tree Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Working with the Leaf Statistics Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Working with the Assessment Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Details Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Contents ix

Chapter 38 / Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289


Overview of the Cluster Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Cluster Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Working with the Cluster Matrix Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Working with the Parallel Coordinates Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Details Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

Chapter 39 / Model Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293


Overview of Model Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Model Comparison Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Model Comparison Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Model Comparison Results Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295

PART 6 Designing Reports 297

Chapter 40 / Overview of SAS Visual Analytics Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299


About the SAS Visual Analytics Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Your First Look at the Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Understanding the Tabs in the Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
About the Canvas in the Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
About Report Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Specifying Your Preferences for the Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

Chapter 41 / Creating and Working with Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307


About Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Create a New Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Choose a Report View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Choose a Report Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
View Report Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Change a Report’s Name or Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Import a Report or Report Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Repurpose an Existing Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Open a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Refresh a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Delete a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

Chapter 42 / Using Report Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317


About Report Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Insert a Report Object into a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Show or Hide Report Objects in the Objects Tab . . . . . . . . . . . . . . . . . . . . . . . . . 321
Using Tables to Display Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Use the Combine Excluded Rows (or Cells) into “All Other” Properties . . . . . 327
Using Graphs to Display Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Using Controls to Display Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Using Container Object Types in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Using Other Object Types in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Using Custom Graphs to Display Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Duplicate a Report Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Working with Alerts for Report Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349

Chapter 43 / Working with Data in SAS Visual Analytics Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . 353


Overview of Data Sources and Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Working with Data Sources in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
x Contents

Working with Hierarchies in a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359


Working with Data Items in a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Working with Geography Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Working with Calculated Items in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Working with Data Role Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
Sorting Data in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Cancel a Slow-Running Query for a Report Object . . . . . . . . . . . . . . . . . . . . . . . 397

Chapter 44 / Working with Display Rules for Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399


Overview of Display Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Add Report-Level Display Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Adding Table-Level Display Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Adding Graph-Level Display Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Adding Gauge-Level Display Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

Chapter 45 / Working with Report Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417


About Report Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Using Detail Report Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Using Post-Aggregate Report Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427

Chapter 46 / Working with Report Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431


Overview of Report Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
Creating a Report Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
Delete a Report Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444

Chapter 47 / Working with Report Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445


Overview of Report Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
Creating Report Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Edit a Report Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
Delete a Report Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
Example: How Report Links and Report Interactions Work Together . . . . . . . 451

Chapter 48 / Ranking Values in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453


Overview of Ranking in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Add a New Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Delete a Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

Chapter 49 / Working with Parameters in Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457


Overview of Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Where Parameters Can Be Used in the Designer . . . . . . . . . . . . . . . . . . . . . . . . 457
Create a New Parameter for a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Edit a Parameter for a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Delete a Parameter for a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Example: Using Parameters in a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460

Chapter 50 / Maintaining Multi-Section Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461


Overview of Report Sections and Info Windows . . . . . . . . . . . . . . . . . . . . . . . . . 461
Add a Section to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Add an Info Window to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Reorder Report Sections or Info Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Rename a Report Section or an Info Window . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Duplicate a Report Section or an Info Window . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Move a Report Object to Another Section or Info Window . . . . . . . . . . . . . . . . . 464
Delete a Report Section or an Info Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Contents xi

Chapter 51 / Sharing Reports with Other Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465


Overview of Sharing Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
E-mail a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Printing Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
Exporting Content from the Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Add Comments to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Distributing Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Localize Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

PART 7 Creating Custom Graph Objects 483

Chapter 52 / Creating and Using Custom Graph Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485


About the Graph Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
About the Graph Template Gallery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Build a Custom Graph Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Working with Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
Adding a Graph Element to an Existing Graph Object . . . . . . . . . . . . . . . . . . . . 490
Incompatible Graph Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Creating a Data-Driven Lattice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Save a Custom Graph Object So It Appears in the Designer . . . . . . . . . . . . . . 497
Add a Graph Object to the Designer’s Objects Tab . . . . . . . . . . . . . . . . . . . . . . . 498
Specify Your Preferences for the Graph Builder . . . . . . . . . . . . . . . . . . . . . . . . . 498

Chapter 53 / Modifying Custom Graph Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501


Change a Custom Graph That Has Been Saved . . . . . . . . . . . . . . . . . . . . . . . . . 501
Select Components and Elements of a Graph Object . . . . . . . . . . . . . . . . . . . . 502
Change the Order of Graph Elements in a Cell . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Remove a Graph Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Working with User-Defined Lattices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Working with Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Sharing Data Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510

Chapter 54 / Graph Builder Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513


Example: Data-Driven Lattice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
Example: User-Defined Lattice (Butterfly Chart) . . . . . . . . . . . . . . . . . . . . . . . . . 515
Example: Filled Overlay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
Example: Vector Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519

PART 8 Viewing Reports 523

Chapter 55 / Viewing Reports on a Mobile Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525


Open the App for the First Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
Add a Server Connection for iPad and iPhone . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
Add a Server Connection for Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526

Chapter 56 / Viewing Reports in Modern SAS Visual Analytics Viewer . . . . . . . . . . . . . . . . . . . . . . . 529


Overview of Viewing Reports in SAS Visual Analytics Viewer . . . . . . . . . . . . . . 529
Open a Report in the Modern Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
About Guest Access in the Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
xii Contents

Chapter 57 / Viewing Reports in Classic SAS Visual Analytics Viewer . . . . . . . . . . . . . . . . . . . . . . . 533


Open a Report in the Classic Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
View Report Object Information in the Classic Viewer . . . . . . . . . . . . . . . . . . . . 534
Add Comments to a Report in the Classic Viewer . . . . . . . . . . . . . . . . . . . . . . . . 535
Interacting with Reports in the Classic Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Subscribe and Unsubscribe to Alerts in the Classic Viewer . . . . . . . . . . . . . . . . 537
Specify Your Preferences for the Classic Viewer . . . . . . . . . . . . . . . . . . . . . . . . . 537

PART 9 Appendixes 539

Appendix 1 / Keyboard Shortcuts for SAS Visual Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541

Appendix 2 / Gallery of Report Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545


Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
Graphs, Charts, and Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562
Other Report Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

Appendix 3 / Editing a Data Expression in Text Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

Appendix 4 / Aggregations for Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

Appendix 5 / Operators for Data Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575


Overview of Operators for Data Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
Numeric (Simple) Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
Comparison Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
Boolean Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Numeric (Advanced) Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Date and Time Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Aggregated (Simple) Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
Aggregated (Advanced) Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
Periodic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
Text (Simple) Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
Text (Advanced) Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
Calculating Compound Annual Growth Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595

Appendix 6 / Conditions for Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597

Appendix 7 / Data Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599


Data Limits for SAS Visual Analytics Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
High-Cardinality Thresholds for Report Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 602

Appendix 8 / Troubleshooting in SAS Visual Analytics Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605


Repairing Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Displaying Alert Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
Exporting Data from Report Objects to Microsoft Excel 2007 . . . . . . . . . . . . . . 607
Specifying Colors for Data Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
Contents xiii

Appendix 9 / Using URL Parameters to View a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609

Appendix 10 / Schema for Imported Tweets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611

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

Using This Book

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.

n A supported web browser installed on your desktop client.

n A supported version of the Adobe Flash player installed on your desktop


client.
n Access to data sources that can be used to obtain data for exploration or
reports.
Note: SAS Visual Statistics is visually and functionally integrated with SAS
Visual Analytics Explorer. SAS Visual Statistics requires a separate license.
If you have questions about whether you are ready to use SAS Visual Analytics,
contact your system administrator.
xvi Using This Book

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 Home the home page SAS Home


SAS Visual Analytics Hub Home

SAS Visual Analytics Administrator the administrator Administrator

SAS Visual Analytics Explorer** the explorer Data Explorer

SAS Visual Analytics Designer the designer Report Designer


(Create Report)

SAS Visual Analytics Graph Builder the graph builder Custom Graph Builder

SAS Visual Analytics Viewer the viewer Report Viewer

SAS Visual Data Builder the data builder Data Preparation


(Prepare Data)
(Create Data Query)

* 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

General Enhancements to SAS Visual


Analytics

The general enhancements include:


n Sample tables, sample reports, and a sample exploration (if you have SAS
Visual Analytics Explorer) are now available. When the samples are installed,
you can access them from SAS Home (the home page).
n You can now import data from a Pivotal HAWQ database.

SAS Visual Analytics Designer

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.

SAS Visual Analytics Viewer

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

SAS Visual Analytics Administration

For information about changes and enhancements in administration of SAS


Visual Analytics, see the SAS Visual Analytics: Administration Guide.
Note: To request access to the SAS Visual Analytics: Administration Guide, see
the instructions on the SAS Visual Analytics page on the SAS support site.
xix

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

What Is SAS Visual Analytics?


SAS Visual Analytics is an easy-to-use, web-based product that leverages SAS
high-performance analytic technologies. SAS Visual Analytics empowers
organizations to explore huge volumes of data very quickly to identify patterns,
trends, and opportunities for further analysis. SAS Visual Data Builder (the data
builder) enables users to summarize data, join data, and enhance the predictive
power of their data. Users can prepare data for exploration and mining quickly
and easily. The highly visual, drag-and-drop data interface of SAS Visual
Analytics Explorer (the explorer), combined with the speed of the SAS LASR
Analytic Server, accelerate analytic computations and enable organizations to
derive value from massive amounts of data. This creates an unprecedented
ability to solve difficult problems, improve business performance, predict future
performance, and mitigate risk rapidly and confidently. SAS Visual Analytics
Designer (the designer) enables users to quickly create reports or dashboards,
which can be viewed on a mobile device or on the web.
Starting in the 7.2 release, the explorer enables you to create, test, and compare
models based on the patterns discovered during exploration of the data. The
explorer enables you to explore, discover, and predict using your data. You can
export the score code, before or after performing model comparison, for use with
other SAS products and to put the model into production.
SAS Visual Analytics empowers business users, business analysts, and IT
administrators to accomplish tasks from an integrated suite of applications that
are accessed from a home page. The central entry point for SAS Visual
Analytics enables users to perform a wide variety of tasks such as preparing
data sources, exploring data, designing reports, as well as analyzing and
interpreting data. Most important, reports can be displayed on a mobile device or
in the SAS Visual Analytics Viewer (the viewer).
4 Chapter 1 / About SAS Visual Analytics

Benefits of Using SAS Visual Analytics


Using SAS Visual Analytics, users can enhance the analytic power of their data,
explore new data sources, investigate them, and create visualizations to uncover
relevant patterns. Users can then easily share those visualizations in reports. In
traditional reporting, the resulting output is well-defined up-front. That is, you
know what you are looking at and what you need to convey. However, data
discovery invites you to plumb the data, its characteristics, and its relationships.
Then, when useful visualizations are created, you can incorporate those
visualizations into reports that are available on a mobile device or in the viewer.
SAS Visual Analytics provides users with the following benefits:
n enables users to apply the power of SAS analytics to massive amounts of
data
n empowers users to visually explore data, based on any variety of measures,
at amazingly fast speeds
n enables users to quickly create powerful statistical models if SAS Visual
Statistics is licensed at your site
n enables users to quickly create reports or dashboards using standard tables,
graphs, and gauges
n enables users to quickly create customized graphs

n enables users to share insights with anyone, anywhere, via the web or a
mobile device

How Does SAS Visual Analytics Work?


You can use SAS Visual Analytics to explore and view data, interact with and
create reports, and display reports using a native mobile app or on the web. You
can explore your data by using interactive visualizations such as charts,
histograms, and tables. Report designers can easily point and click to query
central sources of data. You can add filters and design the layout using tables,
graphs, and gauges. You can use drag and drop to create a well-formatted
report.
The following figure illustrates how the different pieces of SAS Visual Analytics
work together. It shows how users interact with the different interfaces.
SAS Visual Analytics User Community 5

Figure 1.1 Overview of SAS Visual Analytics

Explore Data
Utilize Self-Service
Predictive and
Prescriptive Analytics
Create Hierarchies
Dynamically

Filter on Selection

Viewer Export Visualizations

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

SAS Visual Analytics User Community


The SAS Visual Analytics user community is dedicated to users who are focused
on exploratory visualization and analytical techniques, data preparation,
dashboard reporting, and mobile BI. You can share your experiences, discuss
topics and ideas, seek help from your peers, and share information about
upcoming events. You can access the user community at support.sas.com/
VAUserCommunity.
6 Chapter 1 / About SAS Visual Analytics

For questions requiring immediate technical assistance, contact SAS Technical


Support at support.sas.com.
7

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

About SAS Visual Analytics Users

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

Accessing SAS Visual Analytics as a guest is useful if you do not have a


metadata identity. This enables you to view reports that are widely available
under a generic, shared account. You can also view reports that are available to
the public on the Internet.

Use SAS Home to Access SAS Visual


Analytics
After you sign in to SAS Visual Analytics using the standard sign-in window for
SAS applications, you will see SAS Home (the home page). The home page
enables you to create new content in SAS Visual Analytics. In addition, it
enables you to access content that you and others have created. For more
information, refer to the online Help that is available for the home page.

Overview of SAS Visual Analytics


Capabilities
Users might have access to different functionality, depending on their assigned
roles. Roles are mapped to capabilities. A capability, also known as an
application action, defines the operations a user can perform.
Note: Access to functionality depends on how SAS Visual Analytics is installed
at your site. For example, a site might not have the explorer.
SAS Visual Analytics provides five predefined roles—Basic, Report Viewing,
Analysis, Data Building, and Administration. A predefined set of capabilities is
available for each role. A system administrator can modify these roles and
specify the capabilities for each role that meet the guidelines for your company.
They can also define new roles. If you have questions about your assigned role,
contact your system administrator. For more information about the roles and the
capabilities that are available, see the SAS Visual Analytics: Administration
Guide.
Note: This user's guide discusses tasks that you might be able to perform,
depending on your role.

About the Availability of Menus and Menu


Selections in SAS Visual Analytics
All of the following conditions influence whether a SAS Visual Analytics menu or
menu selection is available to use:
n your role and the associated capabilities. For example, you must have a Data
Building role to prepare data.
n your location in SAS Visual Analytics. For example, some application
features are available only if you are designing a report.
Specifying Your Preferences 9

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.

About Application Themes in SAS Visual


Analytics
An application theme is the collection of colors, graphics, and fonts that appear
in the application. SAS Visual Analytics provides the following themes: SAS
Corporate (default theme), SAS Blue Steel, SAS Dark, SAS High Contrast, and
SAS Light. To change the application theme, see “Specifying Your Preferences”
on page 9.
Note: If you have special requirements for your themes, then contact your
system administrator about using SAS Theme Designer for Flex to build custom
themes. SAS Theme Designer for Flex is installed with SAS themes. For more
information, see SAS Theme Designer for Flex: User’s Guide.
Report themes are available in the designer. The designer provides the following
report themes: SAS Snow, SAS Light, SAS Dark, or SAS High Contrast. SAS
Snow is the default report theme. Your site might also have custom report
themes. For more information, see “About Report Themes” on page 304.

Specifying Your Preferences


All of your preferences and settings persist between sessions. Settings and
preferences are not available for guest users.

Specify Preferences for SAS Visual Analytics


You can specify preferences for SAS Visual Data Builder (the data builder), SAS
Visual Analytics Explorer (the explorer), SAS Visual Analytics Designer (the
designer), SAS Visual Analytics Graph Builder (the graph builder), SAS Visual
Analytics Viewer (the viewer), or SAS Visual Statistics. For example, you can
specify a default scheduling server for the data builder, a default map provider
mode for the explorer, or your preferred report theme for the designer.
Preferences are saved on a per-user basis.
If you are in the data builder, the explorer, the designer, the viewer, or SAS
Visual Statistics, then select File  Preferences to open the Preferences
window.
For information about the specific preferences that are available, see the
following:
n Preferences for the data builder on page 41

n Preferences for the explorer on page 111


10 Chapter 2 / Accessing SAS Visual Analytics

n Preferences for SAS Visual Statistics on page 236

n Preferences for the designer on page 305

n Preferences for the graph builder on page 498

n Preferences for the classic viewer on page 537

Note: Settings are available for the modern viewer. For more information, refer
to the online Help that is available for the modern viewer.

Specify Settings Using SAS Home


You can specify settings for the modern home page (or preferences for the
classic home page). For example, you can specify the initial screen when the
home page is displayed.
Settings for the home page affect SAS Visual Analytics. For example, you can
specify which piece of SAS Visual Analytics opens a report. Suppose that you
specify Edit - Report Designer as the first action in the list of actions for the
SAS report (2G) content type. Then, you receive an e-mail message with a link
to a report. When you click the link to the report, it is displayed in the designer
instead of the viewer.
To specify settings:

1 On the modern home page, select your name, and then click or tap Settings.

2 Click or tap Home in the side menu.

3 Specify any of the following 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.

4 Click or tap Done to apply your changes.

For information about the classic home page, see “Specify Your Preferences for
the Classic Home Page” on page 628.

Specify Global Settings Using SAS Home


You can specify global settings that are applied to all SAS web applications.
These settings are set by each user.
To specify global settings:

1 On the modern home page, select your name, and then click or tap Settings.
Personalize SAS Visual Analytics Using SAS Home 11

2 Click or tap Global in the side menu.

3 Specify any of the following settings:


General
enables you to specify the User locale and Theme.
Note: If you change the User locale, then you must sign out and sign in
to SAS Visual Analytics for the change to take effect.
Side Menu
enables you to hide or change the order of the SAS applications that are
displayed in the side menu.
Accessibility
enables you to specify your preferences for assistive technologies.
For more information, refer to the online Help that is available for the modern
home page.

4 Click or tap Done to apply your changes.

For information about the classic home page, see “Specify Global Preferences
Using the Classic Home Page” on page 627.

Personalize SAS Visual Analytics Using


SAS Home
SAS provides accessibility features that you can use to personalize the user
interface to make it easier to use. Accessibility features are part of the global
settings, which are applied to all SAS web applications, including SAS Visual
Analytics. You can specify global settings using the modern home page. For
more information, see “Specify Global Settings Using SAS Home” on page 10.
The following accessibility features are available:
n Themes: You can change the colors, graphics, and fonts that appear in the
application. Several themes are available, including the SAS High Contrast
theme.
You can also change the themes that are used in reports. For more
information, see “About Report Themes” on page 304.
n Configurable focus indicator: The interface provides an indicator of the
current location of the focus. You can configure the focus indicator to make it
easier to see.
n Color inversion: You can invert the colors in the interface to improve
readability.
n Zoom support: You can make your screen content larger and smaller by
using the zoom in (Ctrl+plus sign) and zoom out (Ctrl+minus sign). You can
reset the zoom state (Ctrl+0) keyboard shortcuts.
n Landmarks in the user interface: Landmarks are references to the primary
areas of an application’s interface. They provide a quick and easy way for
keyboard users to navigate to these areas. Press Ctrl+F6 to open the
Landmarks window.
12 Chapter 2 / Accessing SAS Visual Analytics

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

Data Flow in SAS Visual Analytics


All reporting and exploration of data in SAS Visual Analytics is performed
against data that is in memory on a SAS LASR Analytic Server. In addition to the
in-memory tables, you can use your own data with self-service data access if
you have been granted the capability to import data.
If your site has data that must be prepared before it is ready for analysis, then
the data builder can perform basic data preparation and load data to memory on
a SAS LASR Analytic Server. The following list summarizes the data builder
features that enable the flow of data from source systems into SAS Visual
Analytics:
n Joining tables, such as fact and dimension tables.

n Working with SAS/ACCESS engines to read data from operational systems.

n Scheduling data queries for basic data flow automation.

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.

Self-Service Data Access


SAS Visual Analytics offers a variety of ways for non-administrative users to
bring data into the SAS Visual Analytics environment, which enables you to work
with your data quickly. The following list summarizes the different ways:
16 Chapter 3 / Overview of Data Flow in SAS Visual Analytics

Import data from a file


When you are creating data queries, explorations, or reports, you can import
data from a Microsoft Excel spreadsheet, a delimited text file (CSV), or a
SAS data set. After you import the data into the SAS LASR Analytic Server, it
is ready to use.
Import SAS data set on a server
You can direct the SAS Application Server to import a SAS data set that is
already on the server. The import process is optimized and you can import
large files when a SAS data set is already on the server.
Import a database table
After providing connection information, you can transfer a table from a
database to a SAS LASR Analytic Server. Afterward, you can use the in-
memory table as is for reports and explorations, or you can prepare it for
analysis using the data builder.
Note: Your site must license and configure the related SAS/ACCESS engine
to use this feature.
Import data from Facebook, Google Analytics, or Twitter
After authenticating with Facebook, Google Analytics, or Twitter and
providing search criteria, you can import data into memory on a SAS LASR
Analytic Server. You can then use the unstructured data with the explorer.
For example, a typical exploration of Twitter data can perform text analysis to
look for patterns and trends in the tweets.

TIP The self-service import feature keeps track of your most recently used
values for each import type to simplify repeated import actions.

Managed Data Access


Many sites prepare data sources to be used by business analysts. This
information can come from data sources such as data warehouses and
transactional systems. A data administrator enables access by registering the
tables and libraries in SAS metadata. A data administrator might use additional
SAS products to provide advanced data governance, data quality, and data
management support.
SAS/ACCESS engines can be used to access data in operational systems,
transactional systems, or data warehouses. SAS offers a variety of
SAS/ACCESS engines for accessing data from operational systems. These
engines must be licensed and configured at your site to connect to the data.
After a connection is set up, you can use SAS Management Console and SAS
Visual Analytics Administrator for registering the libraries and tables from these
data sources.

After a SAS LASR Analytic Server Restart


When an administrator restarts a SAS LASR Analytic Server, all the tables on
the server are removed from memory as the server stops. Tables that you import
with the self-service features remain in memory so long as the server is running.
Requirements for Importing Data 17

However, administrators cannot interactively reload imported tables for you. If


you want to use a table that you imported after a server restart, then you must
repeat the import action.

TIP Your administrator can configure a server to automatically reload tables


that were imported from local files after a restart.

Requirements for Importing Data


Importing data requires starting a SAS session on the SAS Application Server.
Typically, this requirement is met by each user who has a host account.
For deployments on Microsoft Windows, the host account must have the Log on
as a batch job Windows privilege. For deployments on Linux that use a
distributed SAS LASR Analytic Server, the host account must be configured for
passwordless SSH. For more information about working with the server, see
SAS LASR Analytic Server: Reference Guide.
18 Chapter 3 / Overview of Data Flow in SAS Visual Analytics
19

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

Import a Local Data File


When you import a local data file from your desktop, such as a spreadsheet, a
delimited text file, or a SAS data set, the file is transferred as data to SAS LASR
Analytic Server. This enables you to access data without needing assistance
from an administrator or information technology group.
The following figure shows how a file is accessed from your PC, transferred to
the SAS Workspace Server, and then stored in an output table.

SAS Web SAS LASR


Application Server Analytic Server

Self-Service
Components
SAS Workspace
Server
Job Execution
PROC IMPORT
Service

SAS Data Set

SAS Data Set

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.

2 Specify the following input file options:


Note: For a SAS data set, there are no options to specify.
Spreadsheet options
The following options are available when you import a Microsoft Excel
spreadsheet:
Select worksheet
Select All or select the check boxes for the worksheets to import.
Begin import on row
The default is to import data from the first row of the spreadsheet. If
the data begins on a different row, select the row.
Includes column names
Select this check box when the row on which to begin the import has
the column names.
Text file options
The following options are available when you import a delimited text file or
a ZIP file:
Delimiter
Select the delimiter that is used in the file that you want to import. You
can specify a single character to use as a user-defined delimiter.
First row contains column names
Select this check box when the file has the column names on the first
row.
Data records begin on row
The default is to import data records from the second row. If you
deselect First row contains column names, then this value indicates
the first row.
Number of rows to scan
The default is to read up to the first 500 rows in the file to determine
the data type and length for each column. A smaller value causes the
import to complete quickly, but you risk the chance of determining a
value too short for character columns. Larger values reduce the
chance of truncating character columns, but they increase processing
time.
Encoding
Select the encoding of the file. If you are importing UTF-8 or UTF-16
data, then make sure that the SAS Web Application Server is a
Unicode server or that all of the file contents can be successfully
transcoded to the encoding of the SAS Web Application Server.
Limitations and Restrictions for Importing Local Data Files 21

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.

Limitations and Restrictions for Importing


Local Data Files

Large Data Files


When you import data files (spreadsheets, SAS data sets, or delimited text files)
from your desktop, you are limited to files that are 4 GB or less. This constraint
is set by the web browser. Because importing large data files through the web
browser impacts overall performance and because you can experience long wait
times, alternate approaches are recommended for importing large files.
Note: Administrators can specify a limit that is less than 4 GB.
As an alternative to importing data files through your web browser, you can use
autoload. You can autoload data from files that are larger than 4 GB. In general,
FTP and network file systems transfer data files faster than web browsers.
Another alternative for importing a large data file is to compress it and import it
as a ZIP file. You can use this option to import comma-separated values (CSV)
text files only. To use this option, compress the file that you want to import, and
then click Text Files in the Import Data window. Here are some key points about
importing ZIP files:
n Make sure that the ZIP file contains only one file. If the ZIP file contains more
than one file, then only the first file is imported.
n A ZIP file must contain only comma-separated values (CSV) files. Other file
formats are not supported.
n A CSV file must have the file extension .csv. Other file extensions are not
supported.

Importing Data from Spreadsheets


The following list identifies considerations for importing data from spreadsheets:
22 Chapter 4 / Importing Local Data Files

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.

Table Names, Column Names, and Special


Characters
In general, you can import files that use blanks and special characters in the
filenames and column names. The following list identifies how table names are
handled:
n For text files (such as CSV files), the table name is initially set from the
filename.
n When you import a spreadsheet, table names are handled as follows:
o If the spreadsheet contains a single worksheet, then the table name is
initially set from the filename.
o If the spreadsheet contains multiple worksheets, then each table name
(for each worksheet) is initially set as a combination of the filename, an
underscore, and the name of the worksheet.
n Some special characters can be used, including spaces. Unsupported
special characters include / \ * ? " < > | : - and period (.). After the
initial table name is determined, any unsupported special character in the
name is replaced with an underscore.
n Table names are shortened to 32 characters because that is the table name
length that is supported by SAS. The entire name appears as the label.
If you clear the Includes column names check box or the First row contains
column names check box, then the column names are generated for you as
follows:
n Spreadsheets Column names are assigned A, B, C, and so on.
Usage Notes 23

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:

Source File Column Name Imported Column Name

2014sales _2014sales for Microsoft Excel files


and text files.

2014 _2014 for XLSX, XLSM, XLSB, and text


files.
For Excel 97-2003 workbook (XLS) files,
a letter such as A, B, C, and so on, is
substituted for the column name,
depending on the column position in the
file.

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

Import a SAS Data Set on a Server


The following figure depicts how your PC can be used to specify a SAS data set
on the SAS Application Server machine (represented as the SAS Workspace
Server), and then load the data set into memory on a SAS LASR Analytic
Server.

SAS Web
Application Server

Self-Service
Components
SAS Workspace
SAS LASR
Server
Analytic Server
Job Execution
DATA Step
Service

SAS Data Set


26 Chapter 5 / Importing Data from Servers

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.

Import a Database Table


To import database tables, the SAS/ACCESS product for the database must be
licensed and configured for the SAS Workspace Server. You can import data
from the following databases:
n Server databases — SAS Data Set, Aster, DB2, Greenplum, MySQL,
Netezza, ODBC, Oracle, PostgreSQL, Salesforce, SAP HANA, SQL Server,
Teradata, Vertica
n Hadoop databases — BigInsights, Cloudera, Cloudera Impala, Pivotal
HAWQ, Hortonworks, MapR, Pivotal HD
Note: BigInsights, Cloudera, Hortonworks, MapR, and Pivotal HD all use the
SAS/ACCESS Interface to Hadoop, even though they have different menu
selections.
To import a database table:

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.

3 Click Browse to select the table to import.

4 (Optional) Expand Options to indicate additional connection options. Here


are some key points about specifying additional connection options:
n For more information about valid values for the Database options field,
see SAS/ACCESS for Relational Databases: Reference. View the Data
Set Options topic for the type of database that you are working with (for
example, Data Set Options for ODBC).
n You can use the SAS system options field to specify environment
variables such as the following:
set=SAS_HADOOP_JAR_PATH="/path/to/files"

The options keyword is submitted with any options that you specify in
this field.

5 (Optional) 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 importing data
from 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.

6 Click OK.

After you have successfully imported a table, the connection information is


saved, except for the password. This enables you to import additional tables
quickly or to reload the table as needed.
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 data for the
table was originally imported.
n Indicate both a different library and a different output folder than when the
data for the table was originally imported.
28 Chapter 5 / Importing Data from Servers

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.

Database Connection Tips

Additional Options for Importing Hadoop Tables


SAS Visual Analytics offers self-service options for importing data from
BigInsights, Cloudera, Cloudera Impala, Pivotal HAWQ, Hortonworks, MapR,
and Pivotal HD. Each of these databases requires separate setup by your
administrator.
A common connection type for all of these databases is to connect to Hive or
HiveServer2, and then import tables.
If the Hadoop cluster is configured with the SAS Embedded Process, then you
can perform parallel loading to the SAS LASR Analytic Server. In this case,
indicate one of the following in the Import Data window:
n In the SAS system options field, specify the
SAS_HADOOP_CONFIG_PATH environment variable. This is not necessary
if your administrator has already specified the values.
n In the Configuration field, specify the path to a Hadoop configuration file.

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).

Additional Options for Importing ODBC Tables


The Specify connection options field provides you with an additional way to
connect to an ODBC database instead of using a data source name. For more
information about possible options, see the LIBNAME Statement Specifics for
ODBC topic in SAS/ACCESS for Relational Databases: Reference.

Additional Options for Importing Oracle Tables


The value for the Path field is related to the net service name in the
tnsnames.ora file. The tnsnames.ora file is generated during the Oracle client
installation on the machine for the SAS Web Application Server. The file is
typically stored in an Oracle installation directory such as /opt/oracle/app/
oracle/product/10.2.0/db_1/network/admin/tnsnames.ora. The net
Database Connection Tips 29

service name for the connection information is in this file. See the following
figure:

Additional Options for Importing PostgreSQL


Tables
The Schema field is not case sensitive when you browse for tables, but it is
case sensitive when the import is performed. As a result, if you specify a
schema in the wrong case, you can successfully browse for a table, and then
select it in the Choose Tables window. However, the import fails. In this case,
contact your database administrator for assistance with the schema name.

Additional Options for Importing Teradata Tables


The Teradata Management Server field is used to determine whether the SAS
LASR Analytic Server is co-located on the same data appliance. If the SAS
LASR Analytic Server and the Teradata database are on the same data
appliance, then make sure that the Teradata Management Server field includes
the host name that the SAS LASR Analytic Server uses.
SAS Visual Analytics and the Teradata database can be configured to transfer
data in parallel when they are not co-located on the same data appliance. For
information about setting up parallel loading, see the Where Do I Locate My
Analytics Cluster topic in SAS Visual Analytics: Installation and Configuration
Guide (Distributed SAS LASR).
30 Chapter 5 / Importing Data from Servers
31

6
Importing Data from Other Sources
Import Data from Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Import Data from Google Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Import Tweets from Twitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Import Data from Facebook


To import data from Facebook:

1 Click Facebook in the Import Data window.

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).

4 Select a date range.

5 Enter the maximum number of posts, comments, and replies to return.

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.

7 (Optional) Review the Proxy Server section. Make changes if necessary.

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

n Indicate a smaller date range.

n Limit the number of posts, comments, or replies.

n Run the import at a lower traffic time.

Import Data from Google Analytics


To begin importing data from Google Analytics, your administrator must give you
access. Contact your administrator and provide your Google Analytics account
information. Administrators must give access using the Google Analytics
website. The drop-down menu options for the Analytics account, Property,
and View (Profile) fields in the Import Google Analytics window will be based on
the type of access that your administrator assigns to you. To import data from
Google Analytics:

1 Click Google Analytics in the Import Data window.

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.

4 Highlight and copy (Ctrl+C) the access code.

5 Navigate back to SAS Visual Analytics. Paste the code (Ctrl+V) in the Paste
access code here field.

6 Click OK. The Import Google Analytics window appears.


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 Google Analytics window.

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.

Note: As an attempt to decrease the processing time of your import, Google


Analytics sometimes returns sampled data. If this occurs, you will receive a
warning message. A column that indicates that the data is sampled will appear
Import Tweets from Twitter 33

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.

Import Tweets from Twitter


To search for tweets and import them:

1 Click Twitter in the Import Data window.

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.

2 Enter a search term and the maximum number of tweets to return.


The search operators that you can use are described at https://
dev.twitter.com/rest/public/search.

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

What Is SAS Visual Data Builder?


The data builder enables analysts and data administrators to perform basic data
preparation. You can create data queries to perform joins, add calculated
columns, and subset and sort data. Several productivity features accelerate the
creation of columns based on common aggregation functions.
Once you create your data queries, you can reuse them as subqueries for more
sophisticated data queries, export them as jobs for scheduling, or schedule them
directly from the user interface.
The data builder has self-service data import features that enable you to access
data from the following data sources:
n Microsoft Excel spreadsheets

n delimited text files

n SAS data sets

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

n append entire in-memory tables to another in-memory table

n save in-memory tables to SASHDAT for persistence and fast reloads

Your First Look at SAS Visual Data Builder


Here are the features of the data builder:

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.

About Managed Access to DBMS Data


The data builder can be used to read source tables from third-party vendor
databases and to write tables to them as well. In order to use this feature, your
site must have a SAS/ACCESS Interface product license for the database that
you want to use. The user ID and password that you use to log on to the data
builder might not be valid for a third-party vendor database. If this is the case,
then you are prompted for credentials to the DBMS when you access a
registered table from a library with a Read operation or a Write operation. As an
alternative to being prompted, you can store a login in metadata that has valid
DBMS credentials. For more information, see "How to Store Passwords for a
Third-Party Server" in SAS Intelligence Platform: Security Administration Guide.
If you are prompted for credentials and supply an invalid user ID or password,
then you are denied access to the data. In this case, you can select File  Clear
Credentials Cache to remove the invalid credentials from your session. The
next time you access the data source, you are prompted again.

Working with User-Defined Formats


A format is a set of instructions that SAS uses to write data values. Formats are
used in the data builder to control the written appearance of data values. User-
defined formats are specialized formats that are not supplied by SAS. These
formats are stored in a custom format catalog.
The preferred method for making user-defined formats available to a SAS
Application Server is to name the custom format catalog formats.sas7bcat, and
to place it in SAS-config-dir/Lev1/SASApp/SASEnvironment/SASFormats.
For more information about using user-defined formats, see SAS Intelligence
Platform: Data Administration Guide.
When a user-defined format is permanently associated with a variable, the data
builder uses the format and shows it in the Format column. However, if you
select the Format menu and choose a different format, you cannot use the
40 Chapter 7 / Overview of SAS Visual Data Builder

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

Specifying Global and General Preferences


To specify global SAS preferences, see “Specifying Your Preferences” on page
9. To specify general preferences, see “Specify Settings Using SAS Home” on
page 10.

Specify Your Preferences for the Data


Builder
To specify preferences that are specific to SAS Visual Data Builder, perform the
following steps after you log on to the data builder:

1 Select File  Preferences to open the Preferences dialog box.

2 Select SAS Visual Data Builder  General.


Select a default SAS Application Server to use from Application server. If
you have added SAS Application Server instances to your deployment, then
make sure that the Job Execution Service has been configured for the SAS
Application Server that you select. For more information, see SAS
Intelligence Platform: Middle-Tier Administration Guide.

3 Select SAS Visual Data Builder  Scheduling.


Specify a default scheduling server, batch server, and deployment directory.
For more information, see “Scheduling Preferences” on page 95.

4 Click OK to apply your changes.


42 Chapter 8 / Specifying Preferences for SAS Visual Data Builder
43

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

What Is a Data Query?


A data query is your primary method for selecting and formatting data that is
used with data exploration and creating reports.
A data query is a metadata object that manages the references to input tables,
output tables, staging tables, joins, and summarizations from a SAS Visual Data
Builder session. You can save data queries and open them later to edit the data
preparation operations that are performed in the data query. You can use saved
data queries as subqueries when you create a new data query.

About Creating Data Queries


You can use the data builder to create data queries to prepare data for analytics.
You can use a data query to subset, sort, join, and add calculated columns to
tables.

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

Save Your Data Query


When you click , you clear the undo and redo history.
The default location for saving data queries is initially set to /My Folder. If you
save the data query in a different folder, then the complete length of the path
and name is limited to 128 characters.
Note: If the data query uses a SAS LASR Analytic Server library for the output
table (this is the default), then the server does not need to be running when you
save the data query. However, the server must have been started at least once
in the past. When you save it, the data builder checks the metadata
authorization for the library and table before it performs the save. If the server
has never been started, then there is no security key to use for checking
authorization. For more information, see "Security Keys" in SAS Visual
Analytics: Administration Guide.

Save a Data Query as a New Data Query


Open an existing data query from the SAS Folders tree that closely matches the
data query that you want to create. Click , and then enter a new name and
select a location. Perform any customizations.
In many cases, you want to use the same input tables, joins, and so on, but you
want a different output table. In this case, click Clear on the Outputs tab, and
then specify new output table information. This step ensures that you use a
different output table for the copied data query.
Note: If you change only the name of the output table in the copied data query,
then the name of the original output table in the original data query is also
changed.
For example, an analyst creates a data query that summarizes sales data and
includes several geographic regions. The data query is saved with an output
table that is named Sales. A regional sales manager wants to perform a similar
summarization, but he wants to filter the data for a single geographic region. In
this case, the regional sales manager performs the following steps:

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.

4 Saves and runs the copied data query.


Adding a Data Source 45

See Also
“Output Tables” on page 50

Using the Design Tab


The Design tab is the default view for working with data queries. This tab
provides an easy-to-use interface for creating a data query. You can perform the
following tasks with the Design tab:
n Drag and drop tables or data queries from the SAS Folders tree onto the
workspace.
n Join tables by using your pointer to select the source column, and then drag
the pointer to the corresponding column in the joined table.
n Add columns to the Column Editor tab by clicking the column name from the
table in the workspace or by right-clicking on the table and selecting Add All
Columns.
n Use the Column Editor tab to specify column expressions, aggregations,
and sort. You can set the attributes for a column, such as the type, format,
and label.
n View the Output Columns tab to see the number of output columns and
attributes. When you specify aggregations and pivot by columns, the number
of output columns can increase dramatically.
n Click to check that the data query is valid.
n Check the Messages tab for information about warnings and errors such as
invalid column expressions.
n Check the Log tab to view the SAS log. A SAS log is generated when you
preview, run, or validate a data query.
n Use the Outputs tab in the right pane to specify output table information.

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

Adding a Data Source

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.

Support for Special Characters


In most cases, you can use table names and column names that contain special
characters, including blank characters. When you use a column in your data
query, the data builder applies the n-literal syntax, such as 'table-
name'n.'column-name'n, so that SAS can use the column.
Rules for SAS names apply. For more information, see “Names in the SAS
Language” in SAS Language Reference: Concepts.
The data builder does not apply the n-literal syntax to code that you enter
manually on the Where tab or Having tab or in column expressions. For
example, if your table has a column that is named quantity ordered, then
you must add the n-literal syntax (similar to the following example):
AVG(table.'quantity ordered'n)

Best Practices for Adding Data Sources


When you plan to join data sources (tables or subqueries), the order in which
you add the data sources to the workspace matters. The first data source that is
added to the workspace is automatically assigned as the left table for any joins
that you add to the data query.
If you are creating a data query that uses a fact table and dimension tables, then
the simplest approach is to drag and drop the fact table onto the workspace first.
You can perform left, right, or full joins with the dimension tables faster because
you must specify only the join type. However, if you drag and drop a dimension
table first, then you can easily use the button on the Joins tab to switch the
left and right tables in the join.
If you are not using a fact table or dimension tables, then the sequence for
adding tables to the workspace might not be very important. Just remember that
the first table dropped onto the workspace is assigned as the left table, and you
can switch the left table and right table on the Joins tab. The data builder takes
advantage of vendor-specific features in SQL processing whenever possible. If
the source tables are from a third-party vendor database, then the
SAS/ACCESS Interface engine can optimize the performance of the data query
by passing the SQL statements through to the database.
Specifying Properties for a Data Query 47

Specifying Properties for a Data Query


On the Properties tab in the right pane, you can view or specify the following
properties:
Name
displays the name for the data query. The initial value is DataQuery1. You
can specify a different name when you save the data query.
Location
displays the metadata folder location for the data query object. The initial
value is /My Folder. You can specify a different location when you save the
data query.
Description
specifies a description of the data query.
Create an SQL query view
specifies to create a view for either the work table or the output table. For
more information, see “Create SQL Query Views” on page 53.
Unique values
specifies whether the SQL keyword DISTINCT is applied to the SELECT
statement that is used to generate the result set for the data query.
Append data
specifies whether the result set for the data query is appended to the output
table. If a staging table is used, then the staging table is replaced with the
result set before appending to the output table.
On the Outputs tab, you can view or specify the following properties:
Table
specifies the table name for either the staging output or the final output. For
more information, see “Specify an Output Table” on page 51.
Compress data
specifies to compress the output table. For more information, see “Output
and Staging Table Interactions” on page 52.
Location
specifies the metadata folder location to use for registering the staging table
metadata or output table metadata. Click to select a different location.
Library
specifies the library to use for the staging table or output table. Click to
select a different library.
Partition by
specifies the column to use for partitioning the output table. This property
only applies when the output table is in a SAS LASR Analytic Server library
or SASHDAT library. For more information, see “Distributed Server: Partition
Tables” on page 83.

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

Specifying Properties for a Source Table


When you create a data query and select a table in the workspace or when you
select it from the menu on the Inputs tab in the right pane, you can specify the
following:
Alias
displays the SAS table name that is stored in metadata. You can specify a
new value to use as a table alias. The alias name is stored with the data
query, and it does not affect the metadata information for the table.
Name
displays the metadata object name. You can change the metadata object
name in the SAS Folders tree by selecting it, right-clicking, and selecting
Rename.
Location
displays the table's metadata folder.
Library
displays the table's library.
Auto-aggregate
specifies whether to apply aggregations to the columns for this table when
the columns are added to the query.
Aggregations
specifies the aggregations to apply to the columns for this table when the
columns are added to the data query.

See Also
“Use the Auto-Aggregate Functions” on page 59

Output Tables

About Output Tables


When you create a data query, you specify an output table on the Outputs tab in
the right pane. When you save the data query, the output table is registered (or
updated) in the metadata. Registering the table in metadata enables you to use
it as a source table for another data query or another SAS application. When
you run the data query, the physical output table is created, and the table is
updated in metadata.
Subqueries do not require an output table. If you do not need to view the results
of a data query that you intend to use as a subquery, then you can click Clear on
the Outputs tab and still save the subquery. You can then drag and drop the
subquery into a data query.
When you create a data query, the default output table name is OutputTable.
Staging Tables 51

Specify an Output Table


Every data query must have an output table in order to save the results in a
table. How you specify the output table affects whether metadata is updated or
created.
You can specify an output table name, location, and library on the Outputs tab
in the right pane.
The following table shows alternative ways to specify an output table.

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

About Staging Tables


Staging data is a best practice because you can use the data builder to access
and transfer data from operational systems once, rather than frequently interfere
with the operational systems and reduce their performance. Using the data
builder to stage data can provide the advantage of adding calculated columns
when you stage the data.
Like the output table, the staging table is registered in metadata when you save
the data query. The physical table for the staging table is created when you run
the data query.
You cannot specify the name for a staging table. The name of the output table is
used, and an _STG suffix is applied to the name. The suffix is used for the table
name in metadata. The physical name of the staging table does not include the
suffix.
52 Chapter 10 / Working with Tables in Data Queries

Specify a Staging Table


To use a staging table, perform the following steps on the Outputs tab:

1 Select the Use a staging table check box.

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.

Output and Staging Table Interactions


The physical table is always replaced with the results of the data query. When
you use a data query to append data and stage the data too, the staging table
holds the data to append. As a result, the output table that the data query
appends to is typically much larger than the staging table.
In the right pane, if you select the Compress data check box on the Outputs
tab, then the tables are compressed as follows:
n If the output table is in the SAS LASR Analytic Server library or SASHDAT
library, then the output table is compressed.
n If the output table is in the SAS LASR Analytic Server library and the staging
table is in the SASHDAT library, then the staging table is compressed. The
staging table will automatically be compressed when it is loaded to memory
on the SAS LASR Analytic Server.
The following table identifies the supported combinations for output tables and
staging tables. In addition, whether you can append data to tables is indicated.

Table 10.1 Output Table and Staging Table Interactions

Output Table Staging Table Append Data

SAS or DBMS * None Supported

SASHDAT None Not supported

Co-located HDFS or NFS- None Supported


mounted MapR

SAS LASR Analytic Server None Supported

SAS or DBMS * SAS or DBMS * Supported

SAS LASR Analytic Server SAS or DBMS * Supported **


Create SQL Query Views 53

Output Table Staging Table Append Data

SAS LASR Analytic Server SASHDAT Not supported


Note: When the staging
table is in SASHDAT, SAS
LASR Analytic Server is
the only choice for the
output table.

SAS LASR Analytic Server Co-located HDFS or NFS- Supported **


mounted MapR

* 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

Create SQL Query Views


You can influence whether the work table or output table is a view or a table. To
specify view, select the Create an SQL query view check box on the
Properties tab. The option is enabled by default. In most cases, this option
improves performance by reducing data movement and storage requirements.
When working with tables in a database, if the source tables and output tables
are in the same library, the Create an SQL query view option can enable you to
pass a CREATE VIEW statement directly to the database. When this happens,
the data query runs almost instantaneously because there is no data movement
to create a view.
The following table summarizes the interactions between library types and
views:

Library Type Interactions

Base SAS Base SAS libraries always support views


for output tables or staging tables. Source
tables can be from different libraries
because the connection information is
stored in the view.
54 Chapter 10 / Working with Tables in Data Queries

Library Type Interactions

DBMS If the source tables and the output tables


or staging tables are in the same library,
then the view is created in the database.
If they are in different libraries, then the
check box is not enabled and the output
table or staging table is created as a
physical table.

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

Adding Columns to a Data Query


When you add a data source (a table or subquery) to the workspace, the
columns from the data source are not automatically added as output columns.
You must add the columns to the data query that you want to use.
After the columns are added, you can specify column expressions and
aggregations and use the sort and pivot by features.
Note: As an exception, the auto-aggregate feature requires that you set the
default aggregations for the table before they are added to the data query.
When a data source is dropped onto the workspace, the column types are
represented by the following icons:

Table 11.1 Icons for Data Types

Icon Description

This icon represents numeric data.

This icon represents character data.


Note: Date, time, and datetime data use this icon. After the
column is added, the Type and Format columns are updated
with information about the new column.
56 Chapter 11 / Working with Columns in Data Queries

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:

1 Click the Column Editor tab.

2 Select the column to remove, right-click, and select Remove Column.

Specify a Column Expression


To specify a column expression:

1 On the Column Editor tab, specify a name for the column.

2 Select table-name.column-name from the Expression column. If you


added a new column manually, then you must make sure that you specified a
table name and a column name.

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.

6 Enter arithmetic operators and expressions such as CASE statements


directly in the SQL expression area.

7 Click Apply to save the column expression.


Specify Aggregations 57

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.

2 In the Choose Aggregations dialog box, select the Aggregate functions


radio button.

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

The following display shows how adding aggregations results in additional


output columns. The aggregate function is appended to the column name.

Remove All Aggregations


To remove all the aggregate functions and group by settings:

1 On the Column Editor tab, select all the columns.

2 Right-click, and select Remove Aggregations.

TIP This menu option is available only when all of the columns are
selected and at least one aggregation is defined.

Use Group By Variables


When you add an aggregation to a column, the remaining columns are
automatically used as group by variables. The Aggregations column displays
GROUP BY for these variables.
You can use a column as a group by variable by following the steps in “Specify
Aggregations” and selecting the Group by radio button.
Use the Pivot By Feature 59

Use the Auto-Aggregate Functions


The auto-aggregate feature is a productivity feature that enables you to specify a
set of aggregations to apply as default aggregations to numeric columns for a
specific table. A typical use is to automatically aggregate some of the columns in
a fact table.
To use the auto-aggregate feature:

1 Select a table on the Design tab.

2 On the Inputs tab, select Enable for Auto-aggregate.

3 Click the ellipsis button next to Aggregations to open the Choose


Aggregations window.

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.

Use the Pivot By Feature


The pivot by feature provides an easy and powerful way to summarize data for
analytics. You can specify a column to use as a categorical variable and the
unique values to use. When the data query is run, the output table is
summarized with the aggregations that you apply.
To use the pivot by feature:

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

The following display shows an example of pivoting by three values in the


Product_Category column.

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.

Figure 11.1 Column Editor Tab with a Pivot By 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.

Figure 11.2 Output Columns Tab with Pivot By Values


62 Chapter 11 / Working with Columns in Data Queries
63

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

About Filtering Data


You can use the Where and Having tabs to filter data in SAS Visual Data
Builder.
The SQL expression on the Where tab is applied to the input data. This SQL
expression is often used to subset data on the columns in the source tables.
The SQL expression on the Having tab can be applied to either the input data or
the calculated columns. This SQL expression is typically used to subset data on
calculated columns in the output table.
The maximum length for a WHERE or HAVING clause is 4096 characters.

Specify a WHERE Clause


To add a WHERE clause to a data query:

1 Click the Where tab.

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.

7 Edit the WHERE clause in the SQL expression area as follows:

Expression Edit Example

A single character value Add an equal sign between the CARS.Make = 'Acura'
column name and the unique
value.

More than one character value Specify an IN operator and CARS.Make IN (


enclose the unique values in 'Acura', 'Audi')
parentheses.

Numeric comparison Specify a numeric operator and a CARS.Cylinders >= 6


constant, or specify a numeric
PRDSALE.Actual > PRDSALE.Estimate
operator and another column
name.

8 Click to save the filter.

Specify a HAVING Clause


To add a HAVING clause to a data query:

1 Click the Having tab.

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”.

8 Click to save the filter.

Best Practices for Filters


SAS Visual Data Builder provides the Where and Having tabs for filtering data.
Follow these best practices:
n Filter on the Where tab first because the WHERE clause reduces the rows to
consider for further subsetting.
n When you specify a filter on a column that is an index or primary key, avoid
using a function whenever it is possible. Using a function, such as
CAST(order_id as DOUBLE), risks performing a full-table scan rather than
using the index.
n In some cases, you can improve performance by filtering on the table that
has the smallest number of rows first.
n If you must remove a table that is used on the Where or Having tabs, then
remove the reference to the table from the filters before you remove the
table. Otherwise, if you remove a table that is referenced in a filter, then all of
the filtering conditions are cleared.
n When adding a subquery using the Libraries tab, an additional step is
needed if the column names or table names are written in a language that
uses a double-byte character set. After you finish adding the columns, you
must manually enter an n-literal to the string on the Code tab for each
column name or table name that uses a double-byte character set. For
example:
'table-name'n.'column-name'n

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

How Does the Automatic Join Feature


Work?

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.

Using Foreign and Primary Keys


If primary key or foreign key information is registered in the metadata for the
table that you drag and drop onto the workspace, then the data builder retrieves
the foreign key and primary key information.
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 retrieves the foreign key and primary key information for the
table, and compares the length, type, and name with the key columns for 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 continues to search
for matches between the two tables, and it adds join conditions when possible.
After a set of join tables is identified, the data builder does not continue iterating
over the tables that are already in the workspace.

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

Selecting the Join Type


When the data builder finds the first set of matching columns by comparing keys
or matching names, it sets the join type for the two tables. The data builder
checks the metadata for the columns to determine whether the columns are
nullable. (Many third-party vendor databases support NOT NULL as a constraint
for a column when the table is created in the database with SQL. The constraint
ensures that there are no missing values for the column.) The data builder
performs the following steps to set the join type:

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

Drag and Drop Join Lines


To add a join by selecting a column name and dragging your pointer to another
column:

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.

Use the Joins Tab


To add a join manually:

1 Click 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.

5 Click in the Join conditions area.

6 Use the menus to replace Not Selected with the column names to use in
the join condition. Click Save.

7 Click to save the join condition with the data query.

Example: Joins with a Junction Table


By default, the data builder considers the first table that you drop in the
workspace as the fact table. As you add tables to the data query, the data
builder attempts to join the tables with the first table, the fact table. This strategy
works well for straightforward fact table and dimension table arrangements.
However, in many cases, you need to join additional tables to a junction table.
Junction tables are also known as bridge tables or link tables.
In the following figure, the Bridge and Accounts_Dim tables are joined to the
Fact table. The Accounts_Dim table has a join on the Account_Key column. The
Bridge table is joined on the compound key (represented as two lines), which
consists of the Transaction_Key and Segment_ID columns.

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:

1 Add the fact table to the data query first.


Managing Joins in a Data Query 71

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:

a Check that the correct columns are used.

b Change the join type, such as from inner to left, as needed.

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.

c Change the join type as needed.

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 .

Managing Joins in a Data Query


Once a join is added to a data query, you can change the join by selecting it in
the workspace, right-clicking, and changing the join type or removing the join
condition.
You can also change a join by clicking the Joins tab, and then selecting the row
in the table. You can make the following changes:
n add and remove tables from the join list

n reorder the sequence of joins by moving them up or down

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.

Best Practices for Managing Joins


In most cases, the sequence in which joins are specified on the Joins tab does
not matter. However, it is possible that the query optimizer for the data source
might perform the joins in a sequence that reduces performance. In these rare
cases, you can change the sequence in which joins are specified on the Joins
tab by selecting the join in the list, and clicking or . This join sequence is
still determined by the query optimizer, but you can control how the SQL for the
join is presented to the query optimizer.
73

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

What is a LASR Star Schema?


A LASR star schema is very similar to a typical star schema in a relational
database. Imagine a single fact table that is surrounded by dimension tables.
Each dimension table is joined to the fact table using a dimension key.
Here are some key facts about LASR star schemas:
n Typically, the dimension key and the corresponding column in the fact table
are the same data type and length. If your tables do not use the same data
type and length, then there are two ways to correct the data:
o Change the data definition in the system with the original data.
o Create a data query that modifies the columns and outputs the table to an
in-memory table.
n Single-level star schemas are supported. Snowflake schemas are not.

n A LASR Star Schema is limited to a single join condition. It does not support
multiple key columns between fact and dimension tables.

Create a LASR Star Schema


To create a LASR star schema:

1 Select LASR  Create a Star Schema.

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.

5 (Optional) Specify a different column prefix. For more information, see


“Column Prefixes”.

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.

8 Click to generate the output table.

How Are Tables Used?

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.

TIP A column name is limited to 32 characters. If you have a long column


name, then reducing the prefix can help you keep more of the original column
name.

Output Table and Conserving Memory


To use memory efficiently, the default output for the schema is a view. The
Create output as a view check box on the Output tab is selected by default to
create a view. If you clear the check box, then the output is a table.
When the output is a view, the rows are created from the original tables when
the view is accessed. This is the main advantage of a view because it does not
create the entire output table and hold it all in memory.
Note: If you choose to output as a view, the memory usage size will display the
value as if the star schema was output as a table.
If you clear the Create output as a view check box to create a table from the
star schema, then the system must have enough available memory to store the
table. If the system runs out of memory while running the star schema, then the
memory that was used for the output table is freed and you receive an error
message.
If you use SAS LASR Analytic Server tables for input to the schema, then the
output table for the star schema must use the same library.
When using tables from an SASHDAT library to create a star schema, the star
schema will fail to save if the SASHDAT library path and the tag of the LASR
output library do not match. In this case, you will receive an error message
stating that the library path does not match the SAS LASR Analytic Server tag.
Try changing the output table to a LASR library whose tag matches the
SASHDAT library path. You can view the tag for the LASR library in SAS
Management Console. For more information, contact your administrator.

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

Using SAS LASR Analytic Server Libraries

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.

Load a Table (As Is) to SAS LASR Analytic


Server
The data builder is typically used to perform basic data preparation. However,
there are cases when a table is already prepared for analysis. In these cases,
you can load a table to memory on SAS LASR Analytic Server without any
modification.
To load a table into memory on a SAS LASR Analytic Server:

1 Use the SAS Folders tree to locate the table.

TIP You can also click , and search for the table by name and location.

2 Select the table, right-click, and select Load a Table.

3 The fields in the Source Table section are filled automatically.


Appending In-Memory Tables 79

Specify the following settings in the dialog box:


Table 15.1 Load a Table Dialog Box Properties

Field Description

Name Enter the name to use for the table. This


field is initially set to the same name as
the source table. This name is
registered in metadata with the SAS
LASR Analytic Server library.

Description Enter a description of the data. This


description is displayed by SAS clients
such as SAS Visual Analytics Explorer.

Location This field is initially set to a default


folder. Click Browse, and select a folder
to use for the table metadata.

Library This field is initially set to a default


library. Click Browse, and select the
SAS LASR Analytic Server library to
use with the table.

4 Click OK.

Appending In-Memory Tables

How Does Appending In-Memory Tables Work?


The data builder provides a very convenient way to add incremental data into a
single table. For example, if sales data is loaded into memory on a daily
schedule, you can append the numerous daily tables into a separate table that
contains the cumulative sales data.
For the purpose of comparison, you can create a data query to append to an in-
memory table with a data query. One reason to append entire tables is that you
can also access the tables individually.

Append In-Memory Tables


To append in-memory tables:

1 Select LASR  Append Tables.

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.

5 Click , and specify a name and location.

6 Click to append the source tables.

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.

How Are Tables Used?

Base and Source Tables


The following list identifies the considerations for source tables:
n The source tables and base table must be in-memory and in the same
library.
n The source tables can be LASR star schema views. However, the base table
cannot be a view.
n If you append tables with character columns of different lengths, then the
length of the column in the base table takes precedence. For example, if you
have a column in the base table that is 15 characters and a column in the
source table is 20 characters, the data from the source table’s column is
truncated to 15 characters.
n If the base table is partitioned, then the source tables must be partitioned on
the same variables.
n If the base table has a column that is not present in a source table, then the
rows in the source table receive a missing value for the column that is not
present in the source table.
n If a source table has columns that are not present in the base table, then the
columns are dropped and are not appended to the base table. The base
table always maintains the same number of columns.
n The order of the columns in a source table does not need to match the order
of the columns in the base table.
n The data builder does not prevent you from appending the same source table
more than once. Review the source table list to ensure you did not
accidentally use a source table more than once.
Distributed Server: Using SASHDAT Libraries 81

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.

Delete Table Metadata


You can use the Delete menu option in the data builder to delete the metadata
for a table that has not yet been loaded to SAS LASR Analytic Server.
If you want to delete a table that has been loaded to SAS LASR Analytic Server,
you must first unload the table from SAS LASR Analytic Server, and then delete
the metadata for the table. For more information, contact your administrator, or
see Loading Data  Administer LASR Tables in SAS Visual Analytics:
Administration Guide.
To delete the metadata for a table:

1 Right-click on the table in the navigation pane.

2 Click Delete on the drop-down menu.

3 Click Yes in the confirmation message that is displayed.

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.

Distributed Server: Using SASHDAT


Libraries

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.

Distributed Server: Save an In-Memory


Table to SASHDAT
Note: This task is applicable if you use a distributed server with co-located
HDFS or NFS-mounted MapR.
To save an in-memory table to SASHDAT:

1 Select LASR  Save a SASHDAT Table.

2 Next to the Name field, click to select the SAS LASR Analytic Server
table.

3 In the SASHDAT Table section, make any necessary changes to the


Location and Library fields.
Note: The data builder is initially configured to use the Visual Analytics
Public LASR library and Visual Analytics Public HDFS library. If you specify
different libraries, then make sure that you understand how the SASHDAT
path is related to the server tag for the SAS LASR Analytic Server library. For
more information, see SAS Visual Analytics: Administration Guide.
Distributed Server: Partition Tables 83

4 (Optional) Specify options in the Properties panel. By default, the data


builder replaces the table if it already exists. You can specify the number of
redundant copies to save.

5 Click , and make any necessary changes.

6 Click to save the table.

Note: The table is saved with the user ID of the user that started the SAS LASR
Analytic Server.

Distributed Server: Legacy Co-located


Providers
One of the most powerful benefits of SAS LASR Analytic Server is the ability to
read data in parallel from a co-located data provider. In this configuration, the
SAS LASR Analytic Server software is installed on the same hardware as the
data provider. The following legacy data providers are supported, and their
default library names and locations are as follows:
Teradata Data Warehouse Appliance
/Shared Data/SAS Visual Analytics/Public/Visual Analytics
Public Teradata
Greenplum Data Computing Appliance
/Shared Data/SAS Visual Analytics/Public/Visual Analytics
Public Greenplum
The data builder excels at accessing data from a variety of data sources,
performing basic data preparation, and then staging the prepared data. After the
data is staged, the server can load the data to memory for exploration, reporting,
and further in-memory data preparation.

Distributed Server: Partition Tables


When you specify a SAS LASR Analytic Server or SASHDAT library as an
output library, you can specify a partition key for the table. You can select a
column to use from the Partition by menu.
Partitioning uses the formatted values of the partition key to group rows that
have the same value for the key. All of the rows that have the same value for the
key are loaded to a single machine in the cluster. For SAS LASR Analytic Server
libraries, this means that the rows that have the same value for the key are in
memory on one machine. For SASHDAT libraries, all of the rows that have the
same value for the key are written to a single file block on one machine. (The
block is replicated to other machines for redundancy.) When the partitioned table
is loaded onto a server, the partitioning remains when it is in memory.
If you select a partition key and also specify sort options for columns on the
Column Editor tab, the sort options are passed to the current engine in an
ORDERBY= option. This enhancement applies to SAS LASR Analytic Server
84 Chapter 15 / Working with 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

Monitoring Memory Usage


A memory gauge is visible in the menu bar that shows the amount of physical
memory that is used on the server.
The server rejects requests to add tables or append rows when 80% or more of
the memory is used. (The default value for the server is 75%. SAS Visual
Analytics deployments set the value at 80%.) System administrators can specify
a different value for the server with SAS Management Console.
For non-distributed deployments, the 80% threshold applies to the single
machine. For distributed deployments, the 80% threshold is evaluated for each
machine in the cluster.
If the threshold is crossed, the operation fails, and the Messages tab includes
an error that is similar to the following example:

ERROR: A server-side limit on the consumption of memory resources


has been reached. These limits can be adjusted by the owner or by
the administrator of the LASR Analytic Server.

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

About SAS Information Maps


A SAS Information Map is descriptive information that is used by many SAS
solutions and Business Intelligence products. An information map is applied to
the data sources in your data warehouse to describe the structure and content of
data. An information map does not contain any physical data. Information maps
provide business users with a user-friendly way to understand data so that they
can perform data queries and get results for themselves.
SAS Information Maps are created with either SAS Information Map Studio or
the INFOMAPS procedure. SAS Visual Data Builder cannot create, edit, or save
an information map. However, the data builder can import the business logic
from a relational information map and represent it as an SQL query.

See Also
Base SAS Guide to Information Maps

Import a SAS Information Map


To import a SAS Information Map:

1 Use the SAS Folders tree to locate the map ( ).

2 Select the map, right-click, and select Import Query.


A new data query is created with the same name as the map. The output
table is automatically set with the same name as the map.

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

Limitations and Restrictions


SAS Visual Data Builder has the following limitations and restrictions for working
with information maps:
n The data builder can use information maps that are based on relational
tables. Information maps that are based on OLAP cubes cannot be used.
n The information map cannot use more than 50 physical tables. A table that is
used more than once in a self join counts as one physical table.
n The information map cannot use more that 5000 physical columns. A column
that is used in more than one data item counts as one physical column.
n Prompts are not supported. Even if a prompt has a default value, the default
value is not included.
n Data items that are based on business data are not supported. For example,
the equation Dataitem1 = Year + 2 (where Year is a data item) is not
included in the data query.
n Data items that are based on physical columns are not supported. For
example, the equation Dataitem2 = FirstName || LastName (where
FirstName and LastName are columns) is not included in the data query.
n The output table is automatically named with the same name as the map.
The name field is limited to 32 characters.
87

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 Add a numeric key to existing tables that have unstructured text.

n Acquire Twitter data to analyze tweet trends. For more information about
Twitter, see Chapter 6, “Importing Data from Other Sources,” on page 31.

Load a Stop List


A stop list is a table of words that you want to ignore in your text analysis. By
eliminating some commonly used words, such as the various forms of the verb
“to be,” you can filter out noise from your analysis. SAS Visual Analytics
supports text analysis in English and German, and includes stop lists for both
languages.
To load a stop list:

1 Select Tools  Load Text Analytics Stop List.

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.

Add a Unique Numeric Key to a Table


In the case where your data already includes unstructured text that you want to
analyze, the data builder can add a unique numeric key as a column in the table.
For example, many data tables include a text column for comments. Using text
analysis, you can look for trends or themes within these comments. The text
analysis in SAS Visual Analytics requires a unique numeric key to reference the
data sources.
To add a unique numeric key to a table:

1 Create a new data query.

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.

4 Specify an output table, library, and location.

5 Save and run the data query.

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

Use the Code Tab


You can click the Code tab to view the SQL statements that are generated by
the data preparation expressions on the Design tab.
You can also use the Code tab to enter custom code.
n The Preprocess and Postprocess views enable you to enter SAS
statements that are run before and after the data query runs.
n The All Code view shows the generated SQL statements. Click to unlock
the view so that you can manually edit all of the SAS statements for the data
query. After you have unlocked the view, the button icon changes to .
After you have unlocked the view, you cannot continue using the Design tab to
edit the data query, and the Preprocess and Postprocess views are disabled.
However, if you have not saved your changes to the code, you can click to be
able to use the Design tab.

Preprocess and Postprocess Code


In some cases, you might want to assign SAS options, load format catalogs, use
LIBNAME statements, or run macros before running a data query. You can
unlock the code to enter the statements, but that prevents you from using the
Design tab. However, the Preprocess view or Postprocess view might enable
you to supplement the data query while using the code generation features of
the Design tab.
90 Chapter 18 / Customizing Code

Any SAS statements that you enter in the Preprocess view or Postprocess
view are included in the All Code view.

Considerations for Manually Editing Code

Before You Manually Edit Code


The code generation features in SAS Visual Data Builder can generate a lot of
SAS statements with a few simple clicks. Depending on your needs, you might
benefit by using the Design tab for adding input tables, performing joins, and
filtering data before you customize the generated code.
Before you unlock the code, you must perform the following steps:

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.

2 (Optional) Specify the following optional settings, if needed:

n On the Properties tab, select Unique values to determine whether the


DISTINCT keyword is included in the generated PROC SQL statement.
After you unlock the code, Unique values cannot be selected to include
the keyword.
n On the Properties tab, select Append data to enable you to use the
generated SAS statements for appending data to the output table.
n On the Outputs tab, select Use a staging table and specify the library
for the staging table.

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

Table and Column Metadata


After unlocking the code and saving it, the columns in the output table are
removed from metadata. This is because the data builder uses the columns
selected on the Design tab to create column metadata, and those column
selections are no longer available after you unlock the view on the Code tab.
When you run the unlocked data query, the column metadata is registered as
part of running the code. However, the columns might not be visible in the data
builder immediately because the table metadata (without any columns) is
cached in the application.
If you did not save the query at least one time before unlocking the code, you
will receive empty columns when you run the query. Make sure that you save the
query before you unlock the code.
Considerations for Manually Editing Code 91

Input and Output Libraries


When you unlock the code for manual editing, you must specify the libraries to
use for your tables. You can do this with LIBNAME statements. If you dragged
and dropped the tables onto the workspace before you unlocked the code for
manual editing, then the LIBNAME statements for the tables are automatically
included.

See Also
n SAS Statements: Reference
n SAS/ACCESS for Relational Databases: Reference

Validate Custom Code


If you entered SAS statements in the Preprocess or Postprocess view, then
those statements are not validated when you click .

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

About Scheduling Data Queries

How Does the Scheduling Feature Work?


When you have a data query open in the workspace, you can click to
schedule the data query. When you schedule a data query, the data builder
performs the following operations:

1 Creates a job that performs the data query operations.

2 Creates a deployed job from the job.

3 Places the job into a new deployed flow.

4 Schedules the flow on a scheduling server.

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.

Edit Data Queries That Are Already Scheduled


If you edit a data query that is already scheduled, you must click again so
that the SAS statements for the data query are regenerated and saved.
Otherwise, the schedule will not continue to run.

Stop Scheduled Data Queries


To stop a scheduled data query and prevent it from running, you must delete the
trigger that is associated with it. To stop a scheduled data query by deleting the
associated trigger, perform the following steps:

1 Open the data query that you want to edit.

2 In the workspace, click to open the Schedule window.

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.

n Run the query immediately by selecting Run now.

5 Click OK.

6 In the workspace, click to save.

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.

Caution about Scheduling Data Queries to Run


Now
When you schedule a data query, one of the options is to run it immediately.
Select Run now in the Schedule window.
Performing the following steps results in an error condition:
1 Use a SAS data set for the output table of the data query.
2 Run the data query.

3 Click the Results tab to look at the output.


4 Schedule the data query by selecting Run now.

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:

Locked Error Message


ERROR: A lock is not available for OUTPUTTABLE.

ERROR: Lock held by process xxxx.

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

Default Scheduling Server


By default, your deployment includes a server that is named Operating
System Services – hostname.example.com. This server is used as the
default scheduling server.
Use the Server Manager plug-in to SAS Management Console to identify the
scheduling servers that are included in your deployment. You can specify a
different scheduling server in your application preferences. Any data queries that
you schedule after you specify a different scheduling server will use the new
scheduling server.
Note: The Distributed In-process scheduling server is not supported.
Some deployments include the Platform Suite for SAS server. To use this server,
change the scheduling server. The default name is Platform Process
Manager.
In all cases, when you schedule a new data query, the data builder retrieves
your default scheduling server, and uses that value to look up the scheduling
server in SAS metadata. The data builder uses the first server that matches the
value in SAS metadata. Including the host name, such as Operating System
Services – hostname.example.com ensures that the data builder uses the
server that you specify.

Default Batch Server


By default, your deployment includes a server that is named SASApp – SAS
DATA Step Batch Server. This server is used as the default batch server.
You can specify a different batch server in your application preferences.
Consider the following before you change the default batch server:
n The batch server must be registered in metadata as a component of a SAS
Application Server that you can access.
n You must specify the same SAS Application Server as your default
application server in your preferences.
As with the default scheduling server, the data builder retrieves your default
batch server, and uses that value to look up the batch server in SAS metadata
the first time you schedule the data query. The data builder uses the first server
that matches the value in SAS metadata.
96 Chapter 19 / Scheduling

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.

Default Deployment Directory


A deployment directory is a SAS metadata object that represents the following
items:
n the name of the SAS Application Server with which the deployment directory
is associated. The default value is SASApp.
n a name for the deployment directory. The default value is Batch Jobs.

n the path to the deployment directory. The default value is SAS-config-dir/


Lev1/SASApp/SASEnvironment/SASCode/Jobs.
When you schedule a data query, the SAS statements for the data query are
saved in a file. The file is saved in the path that is associated with the
deployment directory. The file is named based on the same pattern that is
described in “How Does the Scheduling Feature Work?” on page 93.
The data builder looks up the SAS Application Server in the SAS Metadata
Server using your scheduling server preference setting. The initial value is
SASApp. If a matching server name is not found, then the data builder uses the
first application server that is returned. After the server is determined, the data
builder looks up the deployment directory in that server context that matches
your scheduling server preference setting. If a matching deployment directory is
not found, then the data builder uses the first deployment directory that is
returned.
You can specify a different name for the default deployment directory. For more
information about deployment directories and using the Server Manager plug-in
to SAS Management Console, see Scheduling in SAS.

When Are the Scheduling Preferences Used?


Any of the preferences that you change are used the next time you create a data
query and schedule it. If you edit an existing data query that is already
scheduled, then the existing settings for the scheduling server, batch server, and
deployment directory are not updated with the changes. To change the settings
for existing data queries that are already scheduled, use SAS Management
Console to redeploy the deployed job for the data query.

Creating Events

Why Use Events?


Events specify conditions that must be met before a step in the flow can take
place. You can use SAS Visual Data Builder to create two types of events.
n Time events are evaluated based on a specified time being reached.

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).

Create a Time Event


You can create a time event and use it as a trigger.
To create a time event:

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.

To select individual minutes, expand the grouping.


98 Chapter 19 / Scheduling

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.

5 The Duration in minutes field is used to specify the maximum number of


minutes after the specified time has been reached that the dependency is
kept in an open state. This value is used when a job has multiple
dependencies. It specifies a window of time in which the time event remains
open so that other events can also be met.
For example, a query is specified to run only if a file event and a time event
are both met. The time event has a value for Duration in minutes of 10.
When the time specified for the time event is reached, the query runs if the
file event is met at any time up to 10 minutes later.

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.

Create a File Event


You can create a file event and use it as a trigger. The file event can check for
various file conditions, such as its existence, size, or age.
Note: Not all scheduling servers support file events. Platform Suite for SAS
servers do support file events. The New File Event button that is used to create
a file event is available only when the scheduling server supports file events.
To create a file event:

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.

Export Data Queries as Jobs


For deployments that include SAS Data Integration Studio and prefer to deploy
jobs, create flows, and schedule flows manually, you can export a data query as
a job, and then perform the deployment steps.
This feature enables you to work with a data query interactively while you create
it, and then you can export the data query as a job for automating the
operations. After the job is exported, you can deploy the job for scheduling with
SAS Data Integration Studio. For more information about deploying jobs, see
Scheduling in SAS.
After a job is stored in metadata, you can open the job with SAS Data Integration
Studio and edit it. This might be necessary if you need to add or remove
columns or change the column expression in a calculated column.
If the deployment does not include SAS Data Integration Studio, then you can
modify the data query and export it as a job again. However, you cannot
overwrite job objects in metadata with the data builder. If you need to delete
objects from metadata (such as jobs, libraries, or tables), use SAS Management
Console.
To export a data query as a job:

1 Use the SAS Folders tree to locate the data query.

2 Select the data query, right-click, and select Export as a job.

3 In the Export as a Job window, enter a name and specify a location. Click
Export.

Additional Scheduling Resources


SAS Visual Data Builder provides an easy-to-use method for taking a data query
and making it available for scheduling as a flow. In addition, the Schedule
Manager plug-in to SAS Management Console provides additional resources for
managing deployed flows, job dependencies, and scheduling servers.
For users that are familiar with the Schedule Manager plug-in, be aware that the
data builder does not support scheduling a data query without a trigger. In the
Schedule Manager plug-in, this option is specified as the Manually to the
scheduling server condition. If this is your preferred method for scheduling, you
can use the Schedule Manager plug-in to modify the flow for the scheduled data
query. If you use the data builder to schedule the data query afterward, the
100 Chapter 19 / Scheduling

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

About the Results Tab


After you have created your data query and clicked , it runs, and you are
prompted to determine whether you want to view the results.
If you click Yes, then the data builder retrieves the data and shows you the
results on the Results tab.
Note: For large data sets, retrieving and displaying the data can take a long
time.

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

Navigate within the Data


Navigate to a row in the table by entering the row number in the Go to row field.
The Go to first row and Go to last row buttons provide navigation to the first
and last rows of the table.

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.

Click to set options. The following list identifies the options:


n Options tab
o Exactly matches the specified string
o Contains the specified string (default setting)
o Starts with the specified string
o Case sensitive
o Trim leading and trailing spaces (default setting)
n Columns tab

Enable and clear check boxes to specify the columns to search.

Filter and Sort


Sort the data by clicking , and then choosing the columns and sort order. The
Generated SQL statement field shows the sort criteria.

Filter the data by clicking , and setting the following options:


n The Sample tab is used to limit the number of rows to return or to select
distinct values.
n The Row Filter table is used to subset data with a WHERE clause. You can
filter on the values in multiple columns, set ranges for numeric values, and
use IN and NOT IN criteria for character values. If the number of distinct
values is less than 50, then you can select check boxes for the values. If
there are more than 50 distinct values, then you must enter the values to use
for filtering.
n The Column Filter tab is used to select the columns to display.
Column Headings 103

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

What Is SAS Visual Analytics Explorer?


SAS Visual Analytics Explorer (the explorer) is a component of SAS Visual
Analytics that enables you to explore your data sources. You can explore your
data by using interactive visualizations such as charts, histograms, and tables.
You can also apply data analysis such as forecasting, correlation, and fit lines.
Your work in the explorer is saved as a metadata object called an exploration.
An exploration (sometimes called a visual exploration) contains all of the
visualizations, data settings, and filters from your explorer session.
You can use the explorer to explore in-memory tables from the SAS LASR
Analytic Server. You can either open a table directly or you can open a saved
exploration.
If SAS Visual Statistics is licensed at your site, then you can perform statistical
modeling tasks in the explorer. For more information, see Chapter 32, “Getting
Started with SAS Visual Statistics,” on page 237.
You can export your exploration results as reports, which can be refined in SAS
Visual Analytics Designer (the designer) or viewed directly. Reports can be
viewed on a mobile device or in the SAS Visual Analytics Viewer (the viewer).
You can save your explorations as PDF documents, share your saved
explorations via e-mail, and export your visualizations as image files. You can
export the data from your visualizations to a data file that you can use in other
tools.
Note: Stored processes are not supported in the explorer.
108 Chapter 21 / Overview of SAS Visual Analytics Explorer

The Welcome Window

Overview of the Welcome Window


If you enter the explorer without a reference to a specific exploration, then the
Welcome window appears.
The Welcome window enables you to perform the following tasks:
n “Create a New Exploration” on page 108

n “Open an Existing Exploration” on page 108

Create a New Exploration


To create a new exploration, click Select a Data Source. The Open Data
Source window appears.
To open a data source that is already loaded, select the data source from the
Data Sources pane and then click Open. In the Search field, you can enter a
short string to find all of the data sources whose names, descriptions, or
locations begin with that string.
Note: You can also perform a search that matches a string anywhere in the
data source name, description, or location. Select the Search field, and then
press Ctrl + Down to switch the search to Search (contains).
To load a new data source, click one of the links in the Import Data pane. This
task is available only if you have the Import and Load Data capability.
For information about importing data, 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.

Open an Existing Exploration


To open an existing exploration, you can either select from your recent
explorations, or select any exploration by clicking Browse to locate the
exploration.
Your First Look at the Explorer 109

Your First Look at the Explorer


Here are the main parts of the explorer user interface:

Figure 21.1 The Explorer User Interface

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.

Manage Tabs in the Right Pane


In the right pane, the following tabs can be displayed:
n Roles
n Filters
n Ranks
n Properties
n Comments
n Parameters

To hide a tab, click beside the tab label.


To show a tab, select View  tab-name from the main menu.

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

Specify Global Preferences


See “Specifying Your Preferences” on page 9 for details about global
preferences for SAS Visual Analytics.

Specify Your Preferences for the Explorer


Here are the steps to specify preferences that are specific to SAS Visual
Analytics Explorer (the explorer):

1 Select File  Preferences to open the Preferences window.

2 Select SAS Visual Analytics Explorer  Geographic Mapping.

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.

5 Select SAS Visual Analytics Explorer  Visualizations.

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.

7 Select Visualization data threshold to specify the amount of data values


that your visualizations can process. The precise amount of data that is
supported varies depending on the visualization type. See Appendix 7, “Data
Limits,” on page 599.
112 Chapter 22 / Specifying Preferences for SAS Visual Analytics Explorer

Note: A high value for Visualization data threshold might degrade your
application performance or lead to time-out errors.

8 Select Update automatically to specify whether new visualizations apply


your changes automatically.

9 To return to the default settings, select Reset to Defaults.

10 Click OK to apply your changes. Your preferences persist between sessions.


113

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.

Create a New Exploration


To create a new exploration, select File  New Exploration from the menu bar.
The Open Data Source window appears. Select your data source, and then click
Open.

Save Your Exploration


To save your current exploration, select File  Save As, and then select a
location and a name.

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

Support for Derived Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130


Explore Distinct Values in a Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Editing a Calculated, Aggregated, or Derived Data Item . . . . . . . . . . . . . . . . . . . . 131
Open the Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Specify the Item Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Edit a Parameter Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Add an Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Replace an Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Add a Global Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Delete Part of an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Subset an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Edit an Expression as Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Display the Current Expression as Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Manage the Scratch Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Preview an Expression (Calculated Data Items Only) . . . . . . . . . . . . . . . . . . . . . . 133
Delete a Calculated, Aggregated, or Derived Data Item . . . . . . . . . . . . . . . . . . . . . 133
Duplicate a Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Defining a Geography Data Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
About Geography Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Define a Geography Data Item By Using a Predefined Geographic Role . . . . . 134
Define a Geography Data Item By Using a Custom Geographic Role . . . . . . . . 135
Define Data Items for Text Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

Managing Data Properties

Overview of Managing Data Properties


At any time after you have loaded a data source for your exploration, you can
modify the properties of the data items. The changes that you make are saved
as part of the exploration, but do not affect the original data source.
You can manage the properties for individual data items by using the Data pane
or manage the properties for all of your data items by using the Data Properties
window.

Manage Data Properties for Data Items


You can manage data properties by using the Data Properties window or by
using the properties table in the Data pane.
To access the Data Properties window, select Data  Data Properties from the
menu bar.
For each data item, you can specify the following properties:
Name
specifies the name of the data item.
Classification
specifies whether the data item is a category, a measure, a document
collection, or a geography.
Managing Data Properties 117

Note: Changing the classification from a category to a measure or vice


versa does not change the data type of the data. You can change the data
type by using the Format and Parse operators in a calculated data item.
Model Type
specifies the type of data model for a measure or for a category with
datetime data. Select whether the data model is continuous or discrete.
The model type that you specify determines the type of data filters that you
can create for the data item.
Note: If you change the model type for a data item that is used in a filter,
then the filter is removed.
Format
specifies the data format for the data item.
See “Select a Numeric Format” on page 117 and “Select a Date or Time
Format” on page 117 for information about specifying formats.
Aggregation (for measures only)
specifies the method that is used to aggregate values for the measure. For a
list of the aggregations that you can choose, see “Aggregations for
Measures” on page 573.

Select a Numeric Format


Here are the steps to select a numeric format:

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.

2 Select the basic format type from the Format list.

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.

5 Click OK to apply your format.


Note: You can restore the default format by clicking Reset to Default.

Select a Date or Time Format


Here are the steps to select a date or time format:

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.

2 Select the basic format type from the Format list.

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

4 Click OK to apply your format.

Note: You can restore the default format by clicking Reset to Default.
Note: Time and datetime values in the explorer ignore daylight-saving time.

Show and Hide Data Items


If your exploration contains a large number of data items, you might want to hide
the items that you are not interested in.
Note: Hiding data items on the Data pane does not hide them in the entire
exploration or in the exploration results when you export them as a report. This
feature is not a way to implement column-level security.
Here are the steps to select which data items that are shown in the Data pane:

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.

3 Click OK to apply your changes.

Sort Data Items


To sort your data items in the Data pane, click and then select Sort Items.
Select Ascending by Name or Descending by Name.
Note: The explorer uses the locale of the SAS LASR Analytic Server to sort
data items. For example, if you want to sort data items in the Swedish language,
then the table needs to be loaded into a LASR Analytic Server that is initialized
for the Swedish locale (sv_SE). Contact your system administrator for additional
assistance.

Group Data Items


To group your data items in the Data pane, click , and then select Group
Items. Select one of the following grouping types:
By First Letter
groups by the first letter of the data item name.
By Data Type
groups by data type (date, numeric, or character).
By Model Type
groups by model type (continuous or discrete).
By Classification
groups by data classification (category, geography, hierarchy, measure, or
aggregated measure).
By Format
groups by data format (for example, $CHAR, Numeric, Percent, or
MMMYYY).
Managing Data Properties 119

By Aggregation
groups measures by the default aggregation.
Note: The default grouping is By Classification.

Assigning Colors for Category Values

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.

Assign Colors for a Category


Here are the steps to set the colors for a category:

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.

3 (Optional) To automatically assign persistent colors for all of the unassigned


category values, click Assign remaining. Colors are assigned to all of the
remaining category values. These colors are used consistently in all of your
visualizations.

4 Click OK to apply your changes.

Reset Colors for a Category


Here are the steps to reset the colors for a category:

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 your changes.

Assign a Color for a Specific Category Value


Here are the steps to assign the color for a specific category value:

1 Within a grouped visualization, right-click on a data value, and then select


Change Color.

2 Click the color box to select the color.

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

Add Additional Data Sources to Your


Exploration
At any time, you can add additional data sources to your exploration. To add a
data source to your exploration, select Data  Add Data Source. In the Open
Data Source window, select or import the data source that you want to use, and
then click Open.
For information about importing data, 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.
The new data source is selected automatically in the Data pane. You can use
the drop-down list in the Data pane to select which data source you want to use.
Note: Each visualization in your exploration is associated with a specific data
source. By default, a new visualization uses the data source that is selected in
the Data pane when the visualization is created. For an empty visualization with
no ranks or filters, you can add data items from any data source to change the
data source.

Replace a Data Source in Your Exploration


At any time, you can replace a data source in your exploration with a different
data source. All of the visualizations, filters, and settings that used the previous
data source are applied to the new data source.
Here are the steps to replace a data source in your exploration:

1 In the Data pane, select the data source that you want to replace from the
drop-down list.

2 Click , and then select Change Data Source.

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.

4 Click Change to add the new data source.


Creating Custom Categories 121

Remove a Data Source from Your


Exploration
Here are the steps to remove a data source from your exploration:

1 On the Data pane, select the data source that you want to delete from the
drop-down list.

2 Click , and then select Delete Data Source.

Note: You cannot delete the last remaining data source from an exploration.

3 Confirm that you want to delete the selected data source.

Note: Any visualizations, filters, ranks, or calculated items that are based on
the deleted data source are removed from your exploration.

Refresh Your Data Sources


At any time, you can refresh your data sources to include the latest changes.
To refresh your data sources, select Data  Refresh All Data Sources.
Your visualizations are automatically updated with the refreshed data.

Creating Custom Categories

About Custom Categories


A custom category is a category data item that enables you to assign labels for
groups of values in an existing category or measure.
For example, if your data source contains a category with country names, you
might create a custom category to group the country names by continent. For a
measure, you might label three value ranges as Low, Optimal, and High.

Create a Custom Category for a Measure


Here are the steps to create a custom category for a measure:

1 Select Data  New Custom Category.

2 Select the measure that you want to use for the custom category.

3 Specify the Name for the custom category.

4 Select whether the custom category uses Intervals or Distinct Values.

5 Specify the label groups for the custom category:


122 Chapter 24 / Managing Data

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.

6 Select one of the following options:

Group remaining values as


assigns a label to all values that are not included in your label groups.
The default label text is “Other.”
Show as missing
assigns all values that are not included in your label groups as missing
values.

7 Click OK. The new custom category is displayed in the Data pane.

Create a Custom Category for a Category or a


Date
Here are the steps to create a custom category for a category or a date:

1 Select Data  New Custom Category.

2 Select the category or date that you want to use for the custom category.

3 Specify the Name for the custom category.

4 Specify the label groups 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.

5 Specify the Options for remaining values.


Working with Global Parameters 123

Select one of the following options:


Group remaining values as
assigns a label to all values that are not included in your label groups.
The default label text is “Other.”
Show as missing
assigns all values that are not included in your label groups as missing
values.
Show as is
retains the existing category value for all values that are not included in
your label groups.

6 Click OK. The new custom category is displayed in the Data pane.

Working with Global Parameters

About Global Parameters


Global parameters enable you to specify a variable whose value can be
changed globally at any time. You can use global parameters in filters,
calculated items, and aggregated measures.
If your selected visualization contains a data item or filter that uses a global
parameter, then the parameter appears on the Parameters tab. The same value
for the parameter is used globally in your exploration for all filters, calculated
items, and aggregations that include the parameter.
Note: Global parameters are shown on the Parameters tab only if a data item
or filter that uses the global parameter is used in the selected visualization.

Create a Global Parameter


You can create a global parameter during the process of editing a filter,
calculated item, or aggregated measure.
To create a global parameter, follow these steps:

1 In the expression editor, right-click the Parameter heading in the Data Items
list, and then select Create Parameter.

2 Specify the Name of the 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.

5 Click OK to save the parameter.

6 Finish editing your item. If you close the expression editor window without
saving, then your new parameter is not saved.

Set the Value for a Global Parameter


If your selected visualization contains a global parameter, then the parameter
appears on the Parameters tab.
For a numeric parameter, either drag the slider to adjust the value or click the
value below the slider to edit the value.
For a character parameter, enter the value in the text field.

Edit a Global Parameter


To edit the settings for a parameter, follow these steps:

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.

3 Click OK to apply your changes.

Delete a Global Parameter


To delete a global parameter, follow these steps:

1 Edit a filter, calculated item, or aggregated measure.

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.

3 Finish editing your item, and then click OK.


Creating Calculated Data Items 125

Note: If you close the expression editor window without saving, then the
parameter is not deleted.

Creating Calculated Data Items

About Calculated Data Items


The explorer enables you to calculate new data items from your existing data
items by using an expression.
Note: All calculations are performed on unaggregated data. The calculation
expression is evaluated for each row in the data source before aggregations are
performed. To perform calculations on aggregated data, see “Creating
Aggregated Measures” on page 126.
In addition to performing mathematical calculations on numeric values, you can
use calculated data items to create character values and date and time values.
For example, if your data contains separate categories for month, day, and year,
then you can calculate a date value from each category.

Create a Calculated Data Item


Here are the steps to create a calculated data item:

1 Select Data  New Calculated Item. The New Calculated Item window
appears.

2 Enter a Name for the calculated data item.

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.

Creating Aggregated Measures

About Aggregated Measures


Aggregated measures enable you to calculate new data items by using
aggregated values. For example, you might want to calculate a company’s
profits by subtracting expenses from revenues.
Note: To calculate data items by using unaggregated values, see “Creating
Calculated Data Items” on page 125.
Aggregations are evaluated as part of the calculation expression. For each data
item in your expression, you can select the aggregation type and the context for
the aggregation.

Create an Aggregated Measure


Here are the steps to create an aggregated measure:

1 Select Data  New Aggregated Measure. The New Aggregated Measure


window appears.

2 Enter a Name for the aggregated measure.

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.

4 For each data item in your expression, select an aggregation type. By


default, Sum is used for measures and Distinct is used for categories. To
select a new aggregation type, drag and drop an aggregated operator from
the Operators list onto the aggregation type in the expression. See Appendix
5, “Operators for Data Expressions,” on page 575 for a list of the aggregated
operators that are available.

5 For each aggregated operator in your expression, select the aggregation


context. A drop-down list beside each aggregation enables you to select one
of the following context values:
ByGroup
calculates the aggregation for each subset of the data item that is used in
a visualization. For example, in a bar chart, an aggregated measure with
the ByGroup context calculates a separate aggregated value for each
bar in the chart.
ForAll
calculates the aggregation for the entire data item (after filtering). For
example, in a bar chart, an aggregated measure with the ForAll context
uses the same aggregated value (calculated for the entire data item) for
each bar in the chart.
By using the ForAll and ByGroup contexts together, you can create
measures that compare the local value to the global value. For example, you
might calculate the difference from mean by using an expression like the
following:
Avg ByGroup(X) - Avg ForAll(X)

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.

Support for Aggregated Measures


Aggregated measures can be used in the following visualization types:
n Automatic Chart

n Crosstab

n Bar Chart

n Bubble Plot (grouped bubble plots only)


128 Chapter 24 / Managing Data

n Line Chart

n Treemap

n Geo Map

Creating Derived Items

About Derived Items


For the categories and measures in your exploration, you can create derived
data items. Derived data items are aggregated measures that perform
calculations for your data.

Derived Item Types for Categories


For categories, you can create the following types of derived items:
Distinct Count
displays the number of distinct values for the category that it is based on.
Note: If your category contains missing values, then distinct count is
increased by one.
Count
displays the number of nonmissing values for the category that it is based on.
NMiss
displays the number of missing values for the category that it is based on.

Derived Item Types for Measures


For measures, you can create the following types of derived items:
Difference from Previous Parallel Period
Displays the difference between the value for the current time period and the
value for the previous parallel time period within a larger time interval. For
example, you might derive the difference between 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.
Difference from Previous Period
Displays the difference between the value for the current time period and the
value for the previous time period. For example, you might derive the
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 Difference from Previous Parallel Period
Displays the percentage difference between the value for the current time
period and the value for the previous parallel time period within a larger time
interval. For example, you might derive the percentage difference between
Creating Derived Items 129

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.

Create a Derived Item for a Measure


You can create a derived item for a measure by using the Data pane or by
selecting a measure in a visualization.
To create a derived item from the Data pane, right-click the data item that the
derived item is based on, and then select Create  item-type. If you select a
type that uses a date, select the date data item that is used for date calculations.
To create a derived item in a visualization, right-click a measure heading in the
visualization, and then select Create and Add  item-type. If you select a type
that uses a date, select the date data item that is used for date calculations. The
derived item is added to the visualization automatically.
For a list of item types, see “Derived Item Types for Measures” on page 128.
The new derived item appears in the Data pane.

Create a Derived Item for a Category


To create a derived item for a category from the Data pane, right-click the
category, and then select Create  item-type.
The new derived item appears in the Data pane.

Support for Derived Items


Derived items can be used in the following visualization types:
n Automatic Chart

n Crosstab

n Bar Chart

n Line Chart
Editing a Calculated, Aggregated, or Derived Data Item 131

n Bubble Plot (grouped bubble plots only)

n Network Diagram

n Geo Map

n Treemap

Explore Distinct Values in a Visualization


For a bar chart, line chart, treemap, or geo map that contains a distinct count
derived item, you can explore the distinct values that are associated with a data
point in the visualization. To explore the distinct values, right-click on a data point
in the visualization, and then select Explore Distinct Values. When you explore
the distinct values, a new bar chart is created. The new bar chart displays the
values and the frequency of each value.
For example, you might use a distinct count derived item to create a bar chart
that displays the number of cities where each product line is produced.
Then, you might want to explore the distinct values for City where Promotional
items are produced. By right-clicking on the bar for Promotional, and then
selecting Explore Distinct Values, you get a new bar chart that contains the
cities where promotional items are produced and the frequency of data for each
city.

Editing a Calculated, Aggregated, or


Derived Data Item

Open the Editor Window


To edit a duplicate data item, an aggregated measure, a calculated data item, or
a derived data item, right–click the item in the Data pane, and then select Edit.
Note: You cannot edit a Percent of Total or Percent of Subtotals derived item.

Specify the Item Name


To specify the name for the item, enter a name in the Name field.

Edit a Parameter Value


To edit a parameter value for an operator, select the parameter, and enter a new
value. Or, right-click the parameter field, and select Replace with to select a
data item or a global parameter.
To specify a missing value, enter a period (.) character.
132 Chapter 24 / Managing Data

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.

2 Drag and drop the operator onto the expression.

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.

Add a Global Parameter


To add an existing global parameter to your expression, drag and drop the
parameter from the Data Items list onto your expression.
To create a new global parameter, in the expression editor, right-click the
Parameter heading in the Data Items list, and then select Create Parameter.
For more information about creating global parameters, see “Working with
Global Parameters” on page 123.

Delete Part of an Expression


To delete a part of an expression, highlight the part of the expression that you
want to delete, right-click, and then select Delete or Clear.

Subset an Expression
To subset an expression and delete the remainder:

1 Highlight the part of the expression that you want to keep.

2 Right-click, and select Keep Operand. The parts of the expression that were
not selected are removed.

Edit an Expression as Text


On the Text tab of the expression editor, you can edit an expression as text
code. See “Editing a Data Expression in Text Mode” on page 569.
Note: You can use the Text tab to copy and paste expressions between
explorations and reports.
Duplicate a Data Item 133

Display the Current Expression as Text


To display the current expression as text on the Display Text tab, click the
drop-down list, and then select Show display text.

Manage the Scratch Area


The scratch area of the expression editor enables you to store elements of an
expression, and then add them back into the expression as needed.
You can see the contents of the scratch area on the Scratch tab.
To move items to the scratch area, right-click part of the expression, and select
Move to Scratch Area. You can also drag and drop items from your expression
onto the Scratch tab.
To move an item from the scratch area to your expression, drag and drop the
item from the Scratch tab onto your expression.

To delete an item in the scratch area, click next to the item.

Preview an Expression (Calculated Data Items


Only)
For calculated data items, you can preview the results of your expression by
clicking Preview Results.
You can preview the results of a subset of your expression by right-clicking a
part of your expression, and then selecting Preview Subexpression Results.
Previewing the results of subsets of your expression is useful for troubleshooting
if a complex expression does not return the expected result.

Delete a Calculated, Aggregated, or


Derived Data Item
To delete a duplicate data item, an aggregated measure, a calculated data item,
or a derived data item, right-click on the data item in the Data pane, and then
select Delete.
Note: If the deleted data item is used by a visualization, then a confirmation
message appears. The deleted item is removed from the visualization.
Note: You cannot delete a data item that is included in a hierarchy. You must
remove the data item from any hierarchies before you can delete it.

Duplicate a Data Item


Duplicate data items enable you to use multiple copies of a measure that have
different data formats or default aggregations. For example, you might want to
134 Chapter 24 / Managing Data

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.

3 Click OK to create the duplicate data item.

Defining a Geography Data Item

About Geography Data Items


A geography data item is a category whose values are mapped to geographical
locations or regions. Geography data items can be used with geo maps and
network diagrams to visualize your data on a geographic map.
For example, if your data source contains a CountryName column that identifies
countries, then you might create a geography data item for CountryName by
using the predefined geographic role, Country or Region Names. See “Define
a Geography Data Item By Using a Predefined Geographic Role” on page 134.
You might create a customized geography data item to identify geographic
information that is specific to your organization (for example, sales regions,
warehouse locations, oil platforms, and so on). For each unique combination of
category values, latitude values, and longitude values, a point is plotted on the
geographic map. See “Define a Geography Data Item By Using a Custom
Geographic Role” on page 135.
Note: For predefined geographic roles, the values of your geography data items
must match the lookup values that are used by SAS Visual Analytics. To view
the lookup values, see http://support.sas.com/va72geo.

Define a Geography Data Item By Using a


Predefined Geographic Role
Here are the steps to define a geography data item by using a predefined
geographic role:

1 In the Data pane, locate a category that contains geographic information.

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

Country or Region ISO 2-Letter Codes


specifies countries or regions by using two-letter country codes from the
ISO 3166-1 standard.
Country or Region ISO Numeric Codes
specifies countries or regions by using three-digit numeric country codes
from the ISO 3166-1 standard.
Country or Region SAS Map ID Values
specifies countries or regions by using the two-letter codes that are used
with the MAPSGFK library that is included with SAS/GRAPH.
Note: The two-letter SAS Map ID country values are identical to the ISO
3166–1 two-letter country codes.
Subdivision (State, Province) Names
specifies country subdivisions (for example, states and provinces) by
using the subdivision names.
Subdivision (State, Province) SAS Map ID Values
specifies country subdivisions (for example, states and provinces) by
using the two-letter codes that are used with the MAPSGFK library that is
included with SAS/GRAPH.
US State Names
specifies states and territories in the United States by using the state and
territory names.
US State Abbreviations
specifies states and territories in the United States by using two-letter
postal codes.
US ZIP Codes
specifies five-digit ZIP codes for the United States.

3 Click OK to apply your changes.

Define a Geography Data Item By Using a Custom


Geographic Role
Here are the steps to define a geography data item by using a custom
geographic role:

1 In the Data pane, locate a category that contains geographic information.

2 Right-click the category, and then select Geography  Custom. The


Custom Geography window appears.

3 Specify the following:

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.

4 Click OK to apply your changes.

Define Data Items for Text Analytics


To enable text analytics for the word cloud visualization:

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

Select Values in a Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156


Working with Automatic Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Working with Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
About Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Data Roles for a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Specify Properties for a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Managing Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Working with Crosstabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
About Crosstabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Data Roles for a Crosstab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Specify Properties for a Crosstab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Managing Rows and Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Create a Hierarchy from a Crosstab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Working with Bar Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
About Bar Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Data Roles for a Bar Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Specify Properties for a Bar Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Sort Data Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Working with Line Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
About Line Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Data Roles for a Line Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Specify Properties for a Line Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Sort Data Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Forecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Working with Scatter Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
About Scatter Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Data Roles for a Scatter Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Specify Properties for a Scatter Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Applying Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Working with Bubble Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
About Bubble Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Data Roles for a Bubble Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Specify Properties for a Bubble Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Using Animated Bubble Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Working with Network Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
About Network Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Data Roles for a Network Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Specify Properties for a Network Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Arrange Nodes in a Network Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Use the Spotlight Tool to View Multiple Data Tips . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Select Nodes in a Network Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Control the View of a Network Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Create a Hierarchy from a Network Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Working with Sankey Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
About Sankey Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Data Roles for a Sankey Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Specify Properties for a Sankey Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Managing the Path Selection for a Sankey Diagram . . . . . . . . . . . . . . . . . . . . . . . . 177
Explore the Transaction Identifier Values for a Path Selection . . . . . . . . . . . . . . . 179
Contents 139

Use the Spotlight Tool to View Multiple Data Tips . . . . . . . . . . . . . . . . . . . . . . . . . . 180


Display the Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Zoom a Sankey Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Pan (Scroll) a Sankey Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Working with Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
About Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Data Roles for a Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Specify Properties for a Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Working with Box Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
About Box Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Data Roles for a Box Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Specify Properties for a Box Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Working with Heat Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
About Heat Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Data Roles for a Heat Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Specify Properties for a Heat Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Applying Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Working with Geo Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
About Geo Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Data Roles for a Geo Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Specify Properties for a Geo Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Zoom a Geo Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Pan (Scroll) a Geo Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Working with Treemaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
About Treemaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Data Roles for a Treemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Specify Properties for a Treemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Create a Hierarchy from a Treemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Working with Correlation Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
About Correlation Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Data Roles for a Correlation Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Specify Properties for a Correlation Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Sort Correlation Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Explore the Data for a Cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Working with Decision Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
About Decision Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Data Roles for a Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Specify Properties for a Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Explore a Node as a New Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Derive a Leaf ID Data Item from a Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Display the Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Zoom a Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Pan (Scroll) a Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Working with Word Clouds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
About Word Clouds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Data Roles for a Word Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Specify Properties for a Word Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Explore Text Analytics Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Explore Selected Documents as a New Visualization . . . . . . . . . . . . . . . . . . . . . . 200
140 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:

Automatic Automatically selects the chart type


Chart based on the data that is assigned to
the visualization. When you are first
exploring a new data set, automatic
charts give you a quick view of the data.
For more information, see “Working with
Automatic Charts” on page 157.

Table Displays the data as a table. Tables


enable you to examine the raw data for
each observation in the data source.
You can rearrange the data columns
and apply sorting.
For more information, see “Working with
Tables” on page 158.
Overview of Visualizations 141

Crosstab Displays the data as a crosstab.


Crosstabs enable you to examine the
data for intersections of hierarchy
nodes or category values. You can
rearrange the rows and columns and
apply sorting. Unlike tables, crosstabs
display aggregated data.
For more information, see “Working with
Crosstabs” on page 159.

Bar Chart Displays the data as a bar chart. Bar


charts are useful for comparing data
that is aggregated by the distinct values
of a category.
A bar chart consists of vertical bars or
horizontal bars. You can apply grouping
and create lattices.
For more information, see “Working with
Bar Charts” on page 160.

Line Chart Displays the data as a line chart. A line


chart is useful for data trends over time.
Line charts support forecasting for
predicting future values.
You can apply grouping and create
lattices.
For more information, see “Working with
Line Charts” on page 162.
142 Chapter 25 / Working with Visualizations

Scatter Plot Displays the data as a scatter plot.


Scatter plots are useful to examine the
relationship between numeric data
items.
In a scatter plot, you can apply
statistical analysis with correlation and
regression. Scatter plots support
grouping.
When you apply more than two
measures to a scatter plot, a scatter
plot matrix compares each pair of
measures.
For more information, see “Working with
Scatter Plots” on page 165.

Bubble Plot Displays the data as a bubble plot. A


bubble plot displays the relationships
among at least three measures. Two
measures are represented by the plot
axes, and the third measure is
represented by the size of the plot
markers.
You can apply grouping and create
lattices. By assigning a datetime data
item to the plot, you can animate the
bubbles to display changes in the data
over time.
For more information, see “Working with
Bubble Plots” on page 167.

Network Displays a series of linked nodes. A


Diagram network diagram displays the
relationships between the values of
categories or hierarchy levels.
You can indicate the values of
measures through the sizes and colors
of the nodes and the node links.
For more information, see “Working with
Network Diagrams” on page 170.
Overview of Visualizations 143

Sankey Displays a series of linked nodes,


Diagram where the width of each link indicates
the frequency of the link or the value of
a measure. A Sankey diagram enables
you to perform path analytics. Path
analytics displays flows of data from
one event (value) to another, as a
series of paths.
For more information, see “Working with
Sankey Diagrams” on page 174.

Histogram Displays the data as a histogram. A


histogram displays the distribution of
values for a single measure.
You can select the bar orientation, and
you can select whether the values are
displayed as a percentage or as a
count.
For more information, see “Working with
Histograms” on page 180.

Box Plot Displays the data as a box plot. A box


plot displays the distribution of values
for a single measure using a box and
whiskers. The size and location of the
box indicate the range of values that
are between the 25th and 75th
percentile. Additional statistical
information is represented by other
visual features.
You can create lattices, and you can
select whether the average (mean)
value and outliers are displayed for
each box.
For more information, see “Working with
Box Plots” on page 182.
144 Chapter 25 / Working with Visualizations

Heat Map Displays the data as a heat map. A heat


map displays the distribution of values
for two data items using a table with
colored cells. If you do not assign a
measure to the Color data role, then a
cell’s color represents the frequency of
each intersection of values. If you
assign a measure to the Color data
role, then a cell’s color represents the
measure value of each intersection of
values.
For more information, see “Working with
Heat Maps” on page 184.

Geo Map Displays the data as a geo map. A geo


map displays your data as an overlay
on a geographic map. You can display
your data either as bubbles, as a
scatter plot, or as colored regions.
For more information, see “Working with
Geo Maps” on page 186.

Treemap Displays the data as a treemap. A


treemap displays your data as a set of
rectangles (called tiles). Each tile
represents a category value or a
hierarchy node. The size of each tile
represents either the frequency of the
category or the value of a measure. The
color of each tile can indicate the value
of an additional measure.
For more information, see “Working with
Treemaps” on page 188.
Overview of Visualizations 145

Correlation Displays the data as a correlation


Matrix matrix. A correlation matrix displays the
degree of correlation between
measures as a series of colored
rectangles. The color of each rectangle
indicates the strength of the correlation.
For more information, see “Working with
Correlation Matrices” on page 189.

Decision Tree Displays the data as a decision tree. A


decision tree displays a series of nodes
as a tree, where the top node is the
response data item, and each branch of
the tree represents a split in the values
of a predictor data item.
The splits enable you to see which
values of the predictor data item
correspond to different distributions of
values in the response data item.
For more information, see “Working with
Decision Trees” on page 191.
146 Chapter 25 / Working with Visualizations

Word Cloud Displays a set of words from a


character data item. Depending on the
type of word cloud and your data roles,
the size of each word in the cloud can
indicate the relevance of the word to a
topic, the frequency of the word in a
category, or the value of a measure.
You can use text analytics in a word
cloud to identify topics and terms that
appear together in your data and to
analyze the sentiment of the documents
in a topic.
For more information, see “Working with
Word Clouds” on page 196.

If SAS Visual Statistics is licensed at your site, then the following modeling
visualizations are available:
n Linear Regression

n Logistic Regression

n Generalized Linear Model

n Cluster

For more information, see Chapter 33, “Modeling Information,” on page 249.

Working with Visualizations

Create a New Visualization


To create a new visualization, click on the toolbar, or select Visualization 
New from the menu bar.

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

The new visualization is named “Copy of visualization-name”. You can enter a


new name on the Properties tab.

Show and Minimize Visualizations


To minimize a visualization, click in the visualization that you want to
minimize. The visualization appears in the dock pane at the bottom of the
workspace.
To restore a visualization, click the name of the visualization in the dock pane.
You can select which visualizations are visible by using the Manage
Visualizations window.
To minimize all visualizations, select View  Minimize All Visualizations from
the menu bar.
To show all visualizations, select View  Show All Visualizations from the
menu bar.

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 .

Arrange the Visualizations in the Workspace

Move the Position of a Visualization


To move a visualization, drag and drop the title bar of the visualization on the
location where you want to place the visualization.
When you drag and drop a visualization onto another visualization, the
placement of the visualization is determined by the edge that is closest to the
drop point.
When your workspace contains visualizations in multiple rows, if you drag and
drop a visualization onto the bottom edge or top edge of a visualization, then the
target visualization and the moved visualization split the space that was
previously occupied by the target visualization.

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.

Use the Manage Visualizations Window


The Manage Visualizations window enables you to manage all of your
visualizations together. Each visualization is represented by a thumbnail image
or by an icon of the visualization type if the visualization has not been displayed
in the current session.
To open the Manage Visualizations window, select View  Manage
Visualizations from the main menu bar.
148 Chapter 25 / Working with Visualizations

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.

Search the available visualizations. In the Search field, enter a string to


search for. A visualization matches the
search if the string appears anywhere in
the visualization name.
Only the matching visualizations appear
in the Available list.

Filter the available visualizations.


Click , and then select your filter
parameters. You can filter either on the
visualization type or on the data items that
are used in each visualization.
Only the matching visualizations appear
in the Available list.

Rename a visualization. Right-click on any visualization, and then


select Rename. Enter a new name, and
then click OK.

Delete a visualization. Right-click on any visualization, and then


select Delete.

Display Detailed Data for a Visualization


For all visualization types besides tables and crosstabs, you can display the
detailed data for the visualization in the details table. To display the details table
for a visualization, click the drop-down list from the visualization toolbar, and
then select Show Details.

Change the Data Source for a Visualization


Each visualization in your exploration is associated with a specific data source.
Managing Visualization Data Roles 149

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.

Control Visualization Data Updates


By default, the explorer applies changes to your visualizations automatically
when you change data roles, filters, or ranks.
To disable automatic updates, deselect the Auto-update check box at the
bottom of the right pane. When you are ready to apply your updates, click
Update at the bottom of the right pane.
Note: You can change the default behavior for new visualizations by
deselecting Update automatically in the Preferences window.

Manage Visualization Comments


You can use the Comments tab to view and create comments for the current
visualization. See “Sharing Comments in the Explorer” on page 231.

Managing Visualization Data Roles

Add a Data Item


For a visualization to display data, you must assign data items to it. You can
assign data items to a visualization by performing any of the following actions:
n Drag and drop the data item onto the center of the visualization. The data
item is assigned to a role automatically. If the visualization already has data
items assigned to the required roles, then you can choose how to assign the
new data item.
150 Chapter 25 / Working with Visualizations

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:

Table 25.1 Required Data Items for Visualizations

Visualization Type Requirements

Automatic Chart one data item of any type

Table one data item of any type (except


aggregated measure)

Crosstab one data item of any type

Bar Chart one category or hierarchy

Line Chart one category or hierarchy

Scatter Plot one measure

Bubble Plot three measures

Network Diagram one category or hierarchy

Sankey Diagram one category, one data item of any type


(except aggregated measure), and one
datetime or measure

Histogram one measure

Box Plot one measure

Heat Map two data items of any type (except


aggregated measure)

Geo Map one geography

Treemap one category or hierarchy

Correlation matrix two measures

Decision tree two data items of any type (except


aggregated measure)

Word Cloud one category or document collection


Ranking Data 151

Replace a Data Item


You can replace a data item by using any of the following methods:
n Drag and drop the new data item from the Data pane onto the data item in
the visualization that you want to replace.
n Right-click on the data item that you want to replace in either the visualization
or on the Roles tab, and then select Replace item-name  new-item-
name.

Remove a Data Item


You can remove a data item by using any of the following methods:
n Drag and drop the data item from the visualization onto the Data pane.

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.

Switch Data Roles


To switch the data items that are assigned to two roles, drag and drop one data
item onto another data item either by using the buttons in the visualization or by
using the fields on the Roles tab.
For example, you can switch the axes of a scatter plot by dragging the measure
on the X axis to the measure on the Y axis.

Work with Filters


You can use the Filters tab to subset the data in your visualizations. See
Chapter 26, “Working with Filters,” on page 201.

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.

Create a New Rank


To create a rank:

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.

3 Set the parameters for the rank:

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.

d (Optional) Select Ties to include ties in the rank.


If you select Ties, then the rank selects as many values as necessary to
include all of the ties. If you do not select Ties, then the rank selects only
the number of values that are specified by the rank parameters.
For example, if your rank selects the top three values, but there are five
values tied for the greatest value, then the number of values that are
selected by the rank depends on the Ties option. If you select Ties, then
the rank includes all five of the tied values. If you do not select Ties, then
the rank includes only three of the tied values.
Note: If the ranking does not select all of the tied values, or if the number
of tied values exceeds the maximum that is set by your administrator,
then a message appears.

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.

Managing Visualization Axes

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.

Transfer Axis Settings


For a locked axis, you can transfer the axis settings to a compatible
visualization. A compatible visualization must have a measure (or frequency)
assigned to an axis.
To transfer an axis, right-click the measure heading, and then select Transfer
Axis Settings. From the Select Compatible Visualizations window, select the
visualization to which you want to transfer the axis settings.

Working with Visualization Data Ranges


and Color Gradients

Support for Customized Data Ranges and Color


Gradients
The following visualization types enable you to customize the data range and
color gradient:
n Heat map

n Geo map (with the Color role assigned)


154 Chapter 25 / Working with Visualizations

n Bubble plot (with continuous data assigned to the Color role)

n Network diagram (with the Node Color or Link Color role assigned)

n Word cloud (with the Color role assigned)

n Treemap (with the Color role assigned)

Specify a Custom Color Gradient


To specify a custom color gradient:

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.

3 Click OK to apply the new color gradient.

Specify a Custom Data Range


To specify a custom data range:

1 Right-click on the color gradient in the legend, and then select Configure
Color Gradient.

2 From the Select Color Gradient window, deselect Automatically adjust


color range to data.

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.

6 Click OK to apply the new color gradient.

Share a Color Gradient and Data Range between


Visualizations
To share data ranges and color gradients between visualizations, all of the
visualizations must support c