Está en la página 1de 508

Introduction to the

SAS Business
Intelligence Client Tools

Course Notes

Introduction to the SAS Business Intelligence Client Tools Course Notes was developed by
Kari Richardson and Eric Rossland. Additional contributions were made by Mark Craver, Christine Vitron,
Bobbie Wagoner, and Kathy Wisniewski. Editing and production support was provided by the
Curriculum Development and Support Department. Hardware support was provided by the Education
Information Systems Department.
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.
Introduction to the SAS Business Intelligence Client Tools Course Notes
Copyright 2004 by SAS Institute Inc., Cary, NC 27513, USA. All rights reserved. Printed in the
United States of America. 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.
Book code 60366, course code SBIOVR_003, prepared date 09Nov04.

For Your Information

Table of Contents
Course Description ................................................................................................................. vi
Prerequisites.......................................................................................................................... vii
General Conventions............................................................................................................. viii
Chapter 1

Introduction to the SAS Intelligence Platform................................. 1-1

1.1

SAS Business Intelligence Overview ............................................................................ 1-3

1.2

Business Intelligence Security ...................................................................................... 1-7

Chapter 2

Overview of the SAS Business Intelligence Clients........................ 2-1

2.1

Introduction................................................................................................................. 2-3

2.2

BI Tools Java Clients ................................................................................................ 2-7

2.3

BI Tools Windows Clients....................................................................................... 2-17

2.4

BI Tools Browser Clients ........................................................................................ 2-22

Chapter 3

Introduction to the Orion Star Data ................................................... 3-1

3.1

Overview..................................................................................................................... 3-3

3.2

Data Models.............................................................................................................. 3-12

3.3

Case Study ................................................................................................................ 3-16

Chapter 4

Overview of the SAS Management Console.................................... 4-1

4.1

Introduction to the SAS Management Console.............................................................. 4-3

4.2

How SAS Management Console Works........................................................................ 4-6

4.3

Introduction to SAS Management Console Plug-Ins ................................................... 4-12

4.4

Working with the User Interface................................................................................. 4-15

iii

iv

For Your Information

Chapter 5

Using SAS ETL Studio ...................................................................... 5-1

5.1

SAS ETL Studio Overview .......................................................................................... 5-3

5.2

The SAS ETL Studio Interface .................................................................................... 5-9

5.3

Advanced SAS ETL Studio Features (Self-Study) ...................................................... 5-84

5.4

Solutions to Exercises................................................................................................ 5-91

Chapter 6

SAS OLAP Cube Studio .................................................................... 6-1

6.1

Overview of SAS OLAP Cube Studio .......................................................................... 6-3

6.2

SAS OLAP Cube Studio Interface ............................................................................. 6-17

6.3

SAS OLAP Cube Studio and Microsoft Excel............................................................ 6-44

6.4

Solutions to Exercises................................................................................................ 6-56

Chapter 7

Working with SAS Stored Processes............................................... 7-1

7.1

An Overview of Stored Processes................................................................................. 7-3

7.2

Creating and Registering a Stored Process.................................................................. 7-17

7.3

Creating a Stored Process from a SAS ETL Studio Job (Self-Study).......................... 7-33

7.4

Solutions to Exercises................................................................................................ 7-40

Chapter 8

SAS Enterprise Guide 3................................................................... 8-1

8.1

New Features of SAS Enterprise Guide 3..................................................................... 8-3

8.2

Exploring SAS Enterprise Guide.................................................................................. 8-9

8.3

Using the Stored Process Manager ............................................................................. 8-24

8.4

Working with OLAP Cubes in SAS Enterprise Guide ................................................. 8-42

Chapter 9
9.1

Using SAS Add-In for Microsoft Office............................................. 9-1

Overview of the SAS Add-In for Microsoft Office........................................................ 9-3

For Your Information

9.2

Using the SAS Add-In for Microsoft Office.................................................................. 9-6

9.3

Solutions to Exercises................................................................................................ 9-43

Chapter 10

SAS Information Map Studio .......................................................... 10-1

10.1 Overview of the SAS Information Map Studio ........................................................... 10-3


10.2 Using SAS Information Map Studio......................................................................... 10-12
10.3 Solutions to Exercises.............................................................................................. 10-52
Chapter 11

Using SAS Web Report Studio ....................................................... 11-1

11.1 Overview of SAS Web Report Studio......................................................................... 11-3


11.2 Using SAS Web Report Studio................................................................................... 11-5
11.3 Solutions to Exercises...............................................................................................11-27
Chapter 12

Using SAS Information Delivery Portal .......................................... 12-1

12.1 Overview of the SAS Information Delivery Portal ...................................................... 12-3


12.2 Using the SAS Information Delivery Portal .............................................................. 12-14

vi

For Your Information

Course Description
This training provides participants with a hands-on overview of features in SAS 9 in the areas of
foundation technologies, data warehousing, intelligent storage and business intelligence.

To learn more
A full curriculum of general and statistical instructor-based training is available
at any of the Institutes training facilities. Institute instructors can also provide
on-site training.
For information on other courses in the curriculum, contact the SAS Education
Division at 1-919-531-7321, or send e-mail to training@sas.com. You can also
find this information on the Web at support.sas.com/training/ as well as in the
Training Course Catalog.

For a list of other SAS books that relate to the topics covered in this
Course Notes, USA customers can contact our SAS Publishing Department at
1-800-727-3228 or send e-mail to sasbook@sas.com. Customers outside the
USA, please contact your local SAS office.
Also, see the Publications Catalog on the Web at support.sas.com/pubs for a
complete list of books and a convenient order form.

For Your Information

Prerequisites
None.

vii

viii

For Your Information

General Conventions
This section explains the various conventions used in presenting text, SAS language syntax, and examples
in this book.

Typographical Conventions
You will see several type styles in this book. This list explains the meaning of each style:
UPPERCASE ROMAN

is used for SAS statements and other SAS language elements when they
appear in the text.

italic

identifies terms or concepts that are defined in text. Italic is also used for
book titles when they are referenced in text, as well as for various syntax and
mathematical elements.

bold

is used for emphasis within text.

monospace

is used for examples of SAS programming statements and for SAS character
strings. Monospace is also used to refer to variable and data set names, field
names in windows, information in fields, and user-supplied information.

select

indicates selectable items in windows and menus. This book also uses icons
to represent selectable items.

Syntax Conventions
The general forms of SAS statements and commands shown in this book include only that part of the
syntax actually taught in the course. For complete syntax, see the appropriate SAS reference guide.
PROC CHART DATA = SAS-data-set;
HBAR | VBAR chart-variables </ options>;
RUN;
This is an example of how SAS syntax is shown in text:

PROC and CHART are in uppercase bold because they are SAS keywords.
DATA= is in uppercase to indicate that it must be spelled as shown.
SAS-data-set is in italic because it represents a value that you supply. In this case, the value must be
the name of a SAS data set.
HBAR and VBAR are in uppercase bold because they are SAS keywords. They are separated by a
vertical bar to indicate they are mutually exclusive; you can choose one or the other.
chart-variables is in italic because it represents a value or values that you supply.
</ options> represents optional syntax specific to the HBAR and VBAR statements. The angle
brackets enclose the slash as well as options because if no options are specified you do not include
the slash.
RUN is in uppercase bold because it is a SAS keyword.

For Your Information

ix

For Your Information

Chapter 1 Introduction to the


SAS Intelligence Platform
1.1

SAS Business Intelligence Overview ..........................................................................1-3

1.2

Business Intelligence Security ....................................................................................1-7

1-2

Chapter 1 Introduction to the SAS Intelligence Platform

1.1 SAS Business Intelligence Overview

1.1 SAS Business Intelligence Overview

What Is Business Intelligence?


Business Intelligence is a set of software tools and
applications that enable business users and analysts to
interact with their company data in an easy, efficient, and
effective manner.
SAS Business Intelligence includes
 a set of client applications designed for a specific type
of business or analyst
 SAS server processes designed to provide specific
types of services for the client applications
 a centralized metadata management facility.

Multiple Tier Environment


The SAS Intelligence Platform consists of a multiple tier
environment that is typically represented by the
 client tier
Client
 middle tier
Tier
 server tier.

Middle
Tier

Server
Tier
4

1-3

1-4

Chapter 1 Introduction to the SAS Intelligence Platform

Client Tier
In the most basic terms, if an application is installed on
the machine that the user is sitting at, that machine is the
client tier.
There are three different types of SAS client applications.
Java
Clients

run in a Java runrun-time environment (JRE) and are


installed on the machine where they will be used.

Windows run in the Microsoft Windows environment and are


Clients
installed on the machine where they will be used.
Browser
Clients

run in a Web browser by connecting to a Java


Application Server or Servlet Container on the middle
tier. Only the Web browser is installed on the local
machine.
...

The SAS Business Intelligence (BI) client tools cannot execute SAS code on their own. They have to
request code submission and other services from a SAS server.

Middle Tier
The middle tier is where the Web applications reside and
execute. This tier also contains the infrastructure that
supports the execution of these applications, such as the
 Java Application Server or the Java Servlet Container
 SAS Web Infrastructure Kit (WIK)
 webDAV server.
Java
Java Application
Application Server
Server or
or
Java
Java Servlet
Servlet Container
Container
SAS
SAS Web
Web Infrastructure
Infrastructure Kit
Kit

webDAV
webDAV Server
Server

WebDAV (Web-Based Distributed Authoring and Versioning) is a set of extensions to the HTTP
protocol that allows users to collaboratively edit and manage files on remote Web servers.

1.1 SAS Business Intelligence Overview

Server Tier
The server tier is the machine where one or more
SAS servers is installed and accessed by the BI tools.
There are different types of SAS servers, including:
Metadata
Server

enables centralized metadata delivery and


management to SAS applications across the
enterprise.

Workspace
Server

executes SAS code on behalf of the client


applications.

Stored Process executes and delivers results from SAS Stored


Server
Processes.
OLAP Server

delivers presummarized cubes of data to OLAP


clients.
...

SAS Intelligence Platform


Client
Tier

SAS ETL Studio


SAS OLAP Cube Studio
SAS Management Console
SAS Information Map Studio

SAS Enterprise Guide


SAS Add-In for Microsoft Office

Middle
Tier

SAS Web Report Studio


SAS Information Delivery Portal

HTTP
HTTP Server
Server

SDK
SDK

webDAV
webDAV
Server
Server

Java
Java Servlet
Servlet
Container
Container

Web
Web Infrastructure
Infrastructure Kit
Kit

Server
Tier

SAS
SAS99
Foundation
Foundation

Metadata
Metadata
Server
Server

SAS/CONNECT
SAS/CONNECT
Server
Server

Workspace
Workspace
Server
Server

Stored
Stored Process
Process
Server
Server

OLAP
OLAP
Server
Server

This is simplified diagram of the SAS Intelligence Platform.

1-5

1-6

Chapter 1 Introduction to the SAS Intelligence Platform

Clients Use of Foundation Servers


SAS Foundation Servers
Client Application

Metadata Workspace
Server
Server

Stored
Process
Server

SAS/
OLAP
CONNECT
Server
Server

SAS ETL Studio

SAS OLAP
Cube Studio

SAS Information
Map Studio

SAS Enterprise
Guide

SAS Add-In for


Microsoft Office

SAS Web
Report Studio

SAS Information
Delivery Portal

x
x

1.2 Business Intelligence Security

1.2 Business Intelligence Security

Security Concepts
In the SAS Intelligence environment, security consists of:
Authentication the process of verifying the identity of a
person or process within the guidelines
of a specific security policy
Authorization

the process of determining which


permissions the user has for which
resources.

Authentication is a prerequisite for authorization.

...

11

Security Concepts
An authentication provider is a technology that servers
or applications can use to verify that users are who they
say they are.
By default, the authentication provider for a SAS server is
the host operating system of the machine on which the
server is running.

12

The SAS Metadata Server and SAS OLAP Server can also use alternative authentication providers.
SAS Web applications run under third-party servers that can use a variety of authentication providers.

1-7

1-8

Chapter 1 Introduction to the SAS Intelligence Platform

Chapter 2 Overview of the


SAS Business Intelligence Clients
2.1

Introduction ..................................................................................................................2-3

2.2

BI Tools Java Clients .................................................................................................2-7

2.3

BI Tools Windows Clients .......................................................................................2-17

2.4

BI Tools Browser Clients.........................................................................................2-22

2-2

Chapter 2 Overview of the SAS Business Intelligence Clients

2.1 Introduction

2.1 Introduction

Client Tier Review


In the most basic terms, if an application is installed on
the machine that the user is sitting at, that machine is the
client tier.
There are three types of SAS client applications.
Java Clients

Windows Clients

SAS ETL Studio


SAS OLAP Cube Studio
SAS Management Console
SAS Information Map Studio

Browser Clients

SAS Enterprise Guide


SAS Add-In for Microsoft Office

SAS Web Report Studio


SAS Information Delivery Portal

...

Business Intelligence Personas


IT Support
IT Admin (Ahmed)
 User
administration
 Reporting
administration
 Software
administration

Power Users
Business Analyst (Jacques)
 No DBMS or programming
 Strong Excel
 Ad hoc queries
 OLAP
 Create reports
 Publish reports
 Custom reports
 Understands business metrics

Information Consumers
C-level Execs
 Annotation
 E-mail

Middle Management
(Henri)
 Drill down
 Manipulation
 Annotation

Data Modeler
(Marcel)
 Business View
manager
 Understands
physical
data model
 SQL programmer

Report Administrator
(Robert)
 Report Builder
 Schedule reports
 Monitor queue

Power User (Gloria)











Some DBMS and programming


Strong Excel
Ad hoc queries
Custom reports
Modeling
Analytics
Detail data
Understands business domain

Operational Consumers






Sales
Marketing
Customer Service
Finance
Tech Support

2-3

2-4

Chapter 2 Overview of the SAS Business Intelligence Clients

BI Clients Used by Information Technology


IT Support
IT Admin (Ahmed)
 User
administration
 Reporting
administration
 Software
administration

SAS Management Console

SAS Information
Map Studio

Data Modeler
(Marcel)
 Business View
manager
 Understands
physical
data model
 SQL programmer

SAS ETL Studio


SAS Web Report Studio

Report Administrator
(Robert)
 Report Builder
 Schedule reports
 Monitor queue

...

These slides represent an example of which BI tools might be used by each group and does not
serve as a recommendation.

BI Clients Used by Power Users


Power Users
Business Analyst (Jacques)
 No DBMS or programming
 Strong Excel
 Ad hoc queries
 OLAP
 Create reports
 Publish reports
 Custom reports
 Understands business metrics

SAS Add-In for


Microsoft Office

SAS OLAP Cube Studio

SAS Information
Map Studio

SAS ETL Studio

SAS Enterprise Guide

SAS Web Report Studio

Power User (Gloria)











Some DBMS and programming


Strong Excel
Ad hoc queries
Custom reports
Modeling
Analytics
Detail data
Understands business domain

...

2.1 Introduction

BI Clients Used by Information Consumers


Information Consumers
C-level Execs

SAS Add-In for


Microsoft Office

 Annotation
 E-mail

SAS Information
Delivery Portal
Middle Management
(Henri)
 Drill down
 Manipulation
 Annotation

SAS Web Report Studio


Operational Consumers






Sales
Marketing
Customer Service
Finance
Tech Support

...

SAS Display Manager


The traditional SAS windowing environment, SAS Display
Manager, is still available in SAS9 to develop and run
SAS programs.

2-5

2-6

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS Enterprise Guide


SAS programs can also be developed using the
point-and-click interface in SAS Enterprise Guide.

SAS 9.1 BI Clients


The remainder of this chapter is a quick introduction to the
business intelligence client tools in SAS9.
All of the tools will be covered in-depth in the following
chapters:
SAS Management Console
Chapter 4
SAS ETL Studio
Chapter 5
SAS OLAP Cube Studio
Chapter 6
SAS Enterprise Guide
Chapter 8
SAS Add-In for Microsoft Office
Chapter 9
SAS Information Map Studio
Chapter 10
SAS Web Report Studio
Chapter 11
SAS Information Delivery Portal
Chapter 12
10

SAS Stored Processes will be discussed in Chapter 7.

2.2 BI Tools Java Clients

2.2 BI Tools Java Clients

BI Tools Java Clients


Client Tier
SAS ETL Studio
SAS OLAP Cube Studio
SAS Management Console
SAS Information Map Studio

SAS Enterprise Guide


SAS Add-In for Microsoft Office

SAS Web Report Studio


SAS Information Delivery Portal

SAS Java clients run in a Java run-time environment


(JRE) and are installed on the machine where they will be
used.

12

SAS Management Console

13

2-7

2-8

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS Management Console


The SAS Management Console provides a single
interface for many administrative tasks for the SAS
System. Specific administrative tasks are supported by
plug-ins to
the SAS
Management
Console.

14

Metadata Manager Plug-In


The Metadata Manager plug-in provides a mechanism
to control the SAS Metadata Server.

15

2.2 BI Tools Java Clients

2-9

Data Library Manager Plug-In


Data resources can be identified and managed using the
Data Library Manager plug-in.

16

By identifying data sources in metadata, the administrator has the ability to control access and change
the location of data sources without changing the applications that use the data. Resources, tables, reports,
and stored processes can be secured by user or by group.

User Manager Plug-In


The User Manager plug-in is used to define and manage
users and groups.

17

A user can be a member of one or more groups.

2-10

Chapter 2 Overview of the SAS Business Intelligence Clients

Stored Process Manager Plug-In


The Stored Process Manager plug-in is used to register
stored processes, which are a special kind of SAS
program that can be run from a variety of SAS9 clients.

18

Many properties can be specified when defining a SAS program as a stored process, including where it
should run, where the program is stored, the name of the program, and how the results of the program will
behave.

Server Manager Plug-In


SAS servers and spawners can be defined, configured,
and managed using the Server Manager plug-in.

19

2.2 BI Tools Java Clients

SAS ETL Studio

20

SAS ETL Studio


SAS ETL Studio enables a data warehouse specialist to
create and manage metadata objects that define sources,
targets, and the sequence of steps for the extraction,
transformation,
and loading
of data.

21

SAS ETL Studio is targeted at the same user community that used SAS/Warehouse Administrator.
SAS/Warehouse Administrator is still available in SAS9, but nothing has changed since Release 8.2
of the SAS System.

2-11

2-12

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS ETL Studio Wizards


SAS ETL Studio Wizards can simplify common tasks for
the user including the definition of source and target
tables and the creation of OLAP cubes.

...

22

SAS ETL Studio Process Editor


The Process Editor provides a graphical user interface
(GUI) for designing the jobs and creating the SAS code
for loading the tables in the data warehouse.

23

2.2 BI Tools Java Clients

SAS ETL Studio Source Editor


The Source Editor is used for viewing and editing the SAS
code created for the jobs designed in the Process Editor.

24

SAS OLAP Cube Studio

25

2-13

2-14

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS OLAP Cube Studio


SAS OLAP Cube Studio is used to create OLAP cubes.
The Cube Designer provides a point-and-click interface
for cube creation.

26

The same Cube Designer is also available in SAS ETL Studio.

SAS OLAP Cube Studio


Source tables can be defined in SAS OLAP Cube Studio
using the same Source Designer found in SAS ETL
Studio.

27

2.2 BI Tools Java Clients

SAS Information Map Studio

28

SAS Information Map Studio


SAS Information Map Studio provides the bridge between
the data warehouse and the end user who builds reports
from the data.

29

2-15

2-16

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS Information Map Studio


An information map can create relationships between
tables and organize data efficiently for end users.

30

2.3 BI Tools Windows Clients

2.3 BI Tools Windows Clients

BI Tools Windows Clients


Client Tier
SAS ETL Studio
SAS OLAP Cube Studio
SAS Management Console
SAS Information Map Studio

SAS Enterprise Guide


SAS Add-In for Microsoft Office

SAS Web Report Studio


SAS Information Delivery Portal

SAS Windows clients run in the Microsoft Windows


environment and are installed on the machine where they
will be used.

32

SAS Enterprise Guide

33

2-17

2-18

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS Enterprise Guide


SAS Enterprise Guide Version 3 has been completely
redesigned to be more intuitive and easier to navigate.

34

SAS Enterprise Guide and SAS Stored


Processes
SAS Enterprise Guide can be used to run SAS Stored
Processes and is the preferred method for creating them.

35

2.3 BI Tools Windows Clients

SAS Enterprise Guide and OLAP


SAS Enterprise Guide also provides a powerful viewer
for displaying OLAP cubes and navigating through the
dimensions.

36

SAS Add-In for Microsoft Office

37

2-19

2-20

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS Add-In for Microsoft Office


The SAS Add-In for Microsoft Office provides access to
SAS data sets from Excel.

38

SAS Add-In for Microsoft Office


The SAS Add-In for Microsoft Office provides many
options, including the ability to subset and/or sort data.

39

2.3 BI Tools Windows Clients

2-21

SAS Add-In for Microsoft Office


The SAS Add-In for Microsoft Office also allows SAS
Stored Processes to be run on a server and the results
returned to
either Excel
or Word.

40

SAS does not need to be installed on the local machine in order to access SAS data sets or SAS Stored
Processes using the SAS Add-In for Microsoft Office.

2-22

Chapter 2 Overview of the SAS Business Intelligence Clients

2.4 BI Tools Browser Clients

BI Tools Browser Clients


Client Tier
SAS
ETLStudio
Studio
SAS ETL
SAS
OLAP
Cube
Studio
OLAP
Cube
Studio
SAS
Management
Console
Management
Console
SAS Information Map Studio
Information Map Studio

SAS Enterprise Guide


SAS Add-In for Microsoft Office

SAS Web Report Studio


SAS Information Delivery Portal

SAS browser (thin) clients run in a Web browser by


connecting to a Java Application Server or Servlet
Container on the middle tier. Only the Web browser
is installed on the local machine.

42

SAS Web Report Studio

43

2.4 BI Tools Browser Clients

2-23

SAS Web Report Studio


SAS Web Report Studio
is a Web-based,
wizard-driven
reporting tool.

44

SAS Web Report Studio requires data to be defined in an Information Map and does not work directly
with a data table. Both tabular reports and graphs can be created using the Report Wizard or the Report
Builder.

SAS Web Report Studio Creating Reports


The Report Wizard uses a step-by-step process to help
create a report.

45

2-24

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS Web Report Studio Viewing Reports

46

SAS Information Delivery Portal

47

2.4 BI Tools Browser Clients

SAS Information Delivery Portal


The SAS Information Delivery Portal is a mechanism for
delivering customized enterprise information to the right
people at the right time.

48

SAS ID Portal Pages and Portlets


The SAS Information Delivery Portal uses pages and
portlets to deliver customized information.

49

2-25

2-26

Chapter 2 Overview of the SAS Business Intelligence Clients

SAS ID Portal Pages and Portlets


The pages and portlets of the SAS Information Delivery
Portal can surface all types of information including
 information maps
 stored processes
 reports.

50

SAS ID Portal Customization


The SAS Information Delivery Portal can be customized
with logos, company colors, and so on.

51

Chapter 3 Introduction to the


Orion Star Data
3.1

Overview .......................................................................................................................3-3

3.2

Data Models ................................................................................................................3-12

3.3

Case Study..................................................................................................................3-16

3-2

Chapter 3 Introduction to the Orion Star Data

3.1 Overview

3.1 Overview

Course Data
The data used in this
course is from Orion Star
Sports & Outdoors, which
 is a fictitious retail company selling sports and
outdoor products
 has retail stores in many countries throughout the
world
 sells products in retail stores, through catalog mail
orders, and over the Internet
 utilizes the Orion Star Club to track purchases,
enabling analyses of buying patterns and providing
a basis for CRM activities and targeted product
offerings.
3

3-3

3-4

Chapter 3 Introduction to the Orion Star Data

Orion Star Organization


The Orion Star organization hierarchy has several levels:
 country
 company
 department
 group.

The United States hosts the headquarters as well as most of the administrative functions. Each country
has a retail company associated with it, and all offices were operational within the whole time range of
the data (1998 through early 2003) except the Belgian office, which opened in 1999.

3.1 Overview

Orion Star Employees


Information stored for each employee includes:
 employee ID
 job title
 hire date
 termination
date
 address
 gender
 salary.

3-5

3-6

Chapter 3 Introduction to the Orion Star Data

Orion Star Merchandise


Approximately 5,500 different sports and outdoors
products are offered at Orion Star. The products are
organized into
the hierarchy of:
 product
line
 product
category
 product
group
 product.

3.1 Overview

Orion Star Merchandise


Each product has a cost and sales price. Price change
history is maintained by recording start and end dates
for each price.
All prices are
in U.S. dollars.

3-7

3-8

Chapter 3 Introduction to the Orion Star Data

Orion Star Customers


Orion Star has approximately 100,000 customers spread
across many countries. Customer address information is
stored in a
number of
tables and
includes
 street
 city
 state
 postal code
 country.

Customer names, as well as street addresses, are fictitious, but real city names, county/region names, and
country names are used.
This data is controlled by means of pointers (ID columns), as is often seen where geographical data is
gathered from official sources that are maintained externally to the organization. This approach facilitates
changes to information such as postal codes and street names.

3.1 Overview

Orion Star Orders


Most of the approximately 750,000 orders are sales to
Orion Star Club members for whom customer information
is recorded.
Each order
contains one
or more order
lines (one line
per product
purchased).

3-9

3-10

Chapter 3 Introduction to the Orion Star Data

Orion Star Suppliers


All of the Orion Star products have a pointer to a supplier.
There are 64 suppliers, based in different countries, but
only one
supplier
per product.

10

3.1 Overview

3-11

Orion Star Information Consumers


There are many people and groups at Orion Star who use
SAS software, including
 information systems
 business users
 management and
C-level executives.

11

The Information Systems Department has built a data warehouse by extracting data from Online
Transactional Processing Systems (OLTP) and Enterprise Resource Planning (ERP) systems, as
well as data from external sources.
The business users use the data warehouse
to create data marts
to perform advanced analyses
for querying and reporting.
Management and C-level executives use the SAS Business Intelligence tools to access the information
stored in the data warehouse.

3-12

Chapter 3 Introduction to the Orion Star Data

3.2 Data Models

Orion Star Data Models


The Orion Star data is organized two ways:

13

Normalized
(relational)
model

represents the extracts from OLTP,


ERP, and other systems. This data can
be transformed, cleansed, and loaded
into a data warehouse.

Dimensional
model

represents a data warehouse that


consists of a star schema design. This
data is well suited for use in business
intelligence applications and for ad hoc
querying and reporting.

...

3.2 Data Models

The Normalized (Relational) Data Model

14

3-13

3-14

Chapter 3 Introduction to the Orion Star Data

The normalized data model contains a number of Start_Date and End_Date columns that are used
to ensure an accurate history of changes. Therefore, an item can exist more than once in a particular table
but only once within a particular time interval.
The Product and Organization tables are organized hierarchically. They use product-level and
organization-level IDs to determine the placement of an entity within the appropriate hierarchy.

3.2 Data Models

3-15

The Dimensional Data Model

15

The dimensional data model is the result of an ETL (Extract, Transform, and Load) process and represents
one possible data mart. The dimensional model is a star schema with a fact table that contains orders. The
dimension tables represent data for time, geography, customers, products, suppliers, and employees.

3-16

Chapter 3 Introduction to the Orion Star Data

3.3 Case Study

Case Study Scenario


The remainder of this course uses the SAS BI Client Tools
in a case study scenario to build the Orion Star Marketing
Data Mart by
 defining data libraries
 registering source tables
 defining target tables
 creating ETL jobs
 creating OLAP cubes.

17

Case Study Scenario


Once the Marketing Data Mart is built, it is used to
 create stored processes
 view and analyze data
 create information maps
 create reports
 use the information delivery portal.

18

3.3 Case Study

Case Study Scenario Flowchart

19

Define
Data Libraries

Create
Stored Processes

Register
Source Tables

View and Analyze


Data

Define
Target Tables

Create
Information Maps

Metadata

Create
ETL Jobs

Create Reports

Create
OLAP Cubes

Use the Information


Delivery Portal

3-17

3-18

Chapter 3 Introduction to the Orion Star Data

Chapter 4 Overview of the


SAS Management Console
4.1

Introduction to the SAS Management Console ..........................................................4-3

4.2

How SAS Management Console Works ......................................................................4-6

4.3

Introduction to SAS Management Console Plug-Ins................................................4-12

4.4

Working with the User Interface ................................................................................4-15

4-2

Chapter 4 Overview of the SAS Management Console

4.1 Introduction to the SAS Management Console

4-3

4.1 Introduction to the SAS Management Console

What Is the SAS Management Console?


The SAS Management Console is a Java application
that provides a single point of control for managing
resources that are used throughout the Intelligence
Value Chain.

The SAS Intelligence Value Chain is a strategic framework for delivering enterprise intelligence,
emphasizing the incremental value each component brings, and the strategic value gained from
integrating individual components within the framework of an enterprise-wide strategy.
From data manipulation tools to business reporting, along with interfaces to unparalleled analytic
capabilities, SAS delivers reliable and easy-to-use technologies that leverage historical investments to
drive immediate results.
Each component of the SAS Intelligence Architecture leverages the sharing of common metadata and a
common repository.
No one component is isolated, because communication can occur wherever there is a need for metadata
sharing and exchange.
All components take advantage of, and can utilize, metadata.
The exploitation of this centralized and shareable metadata further enhances the value achieved with
each component while driving down the cost of implementation.

4-4

Chapter 4 Overview of the SAS Management Console

What Is the SAS Management Console?


SAS Management Console's single interface can be used
to perform the administrative tasks required to create and
maintain an integrated environment rather than using a
separate administrative interface for each application in
your enterprise intelligence environment.

Tasks Managed by SAS Management Console


SAS Management Console can be used to manage a
variety of tasks, including
 server definitions
 library definitions
 user definitions
 resource access controls
 metadata repositories
 SAS licenses
 job schedules
 XMLMaps.

4.1 Introduction to the SAS Management Console

Metadata Definitions
SAS Management Console manages resources and
controls them by creating and maintaining metadata
definitions for each resource or control.
The metadata definitions created
in SAS Management Console are
stored in a repository on a SAS
Metadata Server, where they are
available for other applications
to use.
SAS Metadata Server

SAS Metadata Server


The SAS Metadata Server is a multiuser server that
surfaces metadata from one or more repositories to
SAS Open Metadata Interface client applications via
the SAS Open Metadata Architecture.

The SAS Open Metadata Architecture enables


 separate applications to exchange metadata
 centralized management of an organization's
metadata resources.

The SAS Open Metadata Architecture is a general-purpose metadata management facility that provides
common metadata services for applications.

4-5

4-6

Chapter 4 Overview of the SAS Management Console

4.2 How SAS Management Console Works

How SAS Management Console Works


SAS Management Console works in conjunction with
SAS Metadata Servers.
A metadata server must be set up and started before
work can begin with SAS Management Console.

4.2 How SAS Management Console Works

Metadata Profile
When SAS Management Console is invoked, a metadata
profile is selected that specifies
 the metadata server to which metadata definitions will
be written
 the active metadata repository
 information required to connect to the metadata
server.

10

When a metadata profile is defined, the server to which the application connects is specified along with
the user ID it uses to connect to the server. When an application opens a metadata profile, it has access
to the metadata on the specified server based on the security credentials of the user ID under which the
connection was made.

4-7

4-8

Chapter 4 Overview of the SAS Management Console

Connecting to SAS Metadata Servers


Metadata Server DataServ

SAS Management Console


Metadata Profile
Metadata server DataServ
Metadata repository MainRepos
User ID - sastest

Metadata
Repository
MainRepos

ARepos

BRepos

Metadata Server DevServ

...

11

After you open the metadata profile to connect to the metadata server, you can begin using the
SAS Management Console to create metadata definitions. As you create definitions, they are stored
in the active repository on the metadata server.

Connecting to SAS Metadata Servers


Each metadata server can contain multiple repositories,
and the SAS Management Console can be used to store
definitions in any of the repositories.
The active repository is the repository that is currently
selected and is receiving metadata definitions from the
application.

12

4.2 How SAS Management Console Works

4-9

Repositories
SAS Management Console can be used to set up
a hierarchy of repositories on the metadata server,
consisting of different repository types including:
Foundation specify the parent repository for all other
Repositories repositories on the server. This
repository contains resource definitions
that are used throughout the enterprise.
Project
specify development repositories that
Repositories can be used for change management.

...

13

A project repository is a development repository that has dependencies on a foundation or custom


repository.

In addition to these two repository types, a third type can also be defined:
Custom
Repositories

specifies repositories that are dependent on the foundation repository or other


custom repositories and accesses and uses resources from the parent(s).

A repository that is dependent upon another repository inherits metadata from the repository on which it
is dependent.

4-10

Chapter 4 Overview of the SAS Management Console

Metadata and Repositories Review


Metadata is information about data and computing
resources, or data about data. Metadata definitions are
stored in a repository where they are available for use by
other applications.
The Foundation repository is the parent repository for all
other repositories on the server and includes metadata
objects that describe SAS servers, data libraries, data
tables, and metadata users.

14

SAS Servers Review


The various SAS Servers in the Intelligence Platform are
defined in the metadata. These server definitions include
details on where the process is executing and how to
connect to it.
An individual server definition may be part of an
Application Server context that provides a place to attach
libraries, schemas, directories, and any resources that are
to be available to the SAS servers.

15

4.2 How SAS Management Console Works

Metadata Users
Metadata users may have their own metadata identity
and/or belong to a user group. All users who can access
the metadata server implicitly belong to a special group
named PUBLIC.
There are several different types of users in the metadata,
including these:
SAS
Administrator
(sasadm)
sasadm)

an unrestricted user with special


privileges to manage user accounts
and administer the metadata server.

SAS Demo User the account that can be used to


(sasdemo)
access the various client tools.
sasdemo)
...

16

SAS Management Console Case Study Tasks


In class, you only have one
repository, a foundation
repository named Foundation.

Metadata Server

Within the Foundation


repository, the application
server context is named
SASMain, which holds the
various SAS Servers.

17

SASMain

There are several users and


groups defined that will be used
during class, including

PUBLIC (group)

sasadm (unrestricted user)

sasdemo (demo user).

Foundation
Workspace Server
Stored Process Server

PUBLIC

OLAP Server

sasadm

sasdemo

...

4-11

4-12

Chapter 4 Overview of the SAS Management Console

4.3 Introduction to SAS Management Console Plug-Ins

SAS Management Console Plug-Ins


SAS Management Console plug-ins are Java files that
provide specific administrative functions by creating
specific types of metadata definitions.
SAS Management Console includes a standard set of
plug-ins. Additional plug-ins can be installed to access
and manage other SAS or third-party applications.

19

SAS Management Console Plug-Ins


SAS Management Console plug-ins are grouped into
two main categories:
 Environment Management
plug-ins for configuring SAS resources such as
servers, metadata, libraries, and users


Application Management
plug-ins for configuring SAS applications.

When a plug-in is installed, it is added automatically


to the appropriate category.

20

4.3 Introduction to SAS Management Console Plug-Ins

4-13

SAS Management Console Plug-Ins


Some of the plug-ins provided with SAS Management
Console include:
Authorization defines access rules to control how users
Manager
and groups can access metadata definitions.
Data Library
Manager

creates definitions for SAS libraries and


database schemas.

Metadata
Manager

provides functions for defining metadata


repositories on the active server, managing
resource templates, and creating jobs to
promote or replicate a metadata repository.

Schedule
Manager

allows you to create schedules for running


jobs created in SAS ETL Studio.
...

21

Additional plug-ins include:


Server Manager

creates definitions for servers, including SAS application servers, database


servers, and enterprise servers.

User Manager

creates definitions for users and user groups.

License Manager

allows you to view information about the SAS licenses installed on a machine, as
well as details about the machine.

XMLMap Manager

allows you to import and create XMLMaps, which are XML files that describe
how the SAS XML LIBNAME engine should interpret XML markup.

4-14

Chapter 4 Overview of the SAS Management Console

Plug-In Information
Because each plug-in has its own functions, the
SAS Management Console menu bar and toolbar change
whenever you select a node within the navigation tree.
Different nodes within a single plug-in can activate
different menu items and tools.

22

The Help for each plug-in is only available when the plug-in is active. For example, in order to view the
Help for the Metadata Manager plug-in, you must first select the Metadata Manager plug-in or an object
inside the plug-in in the navigation tree.

4.4 Working with the User Interface

4.4 Working with the User Interface

SAS Management Console User Interface


The SAS Management Console user interface consists
of six major parts:
 Menu bar
 Toolbar
 Context bar
 Navigation tree
 Display area
 Status line.

24

4-15

4-16

Chapter 4 Overview of the SAS Management Console

SAS Management Console User Interface

Menu Bar

...

25

The menu bar provides six standard menus and one that is controlled by the selected plug-in:
File

provides selections for opening objects, changing or closing the current metadata profile,
and viewing properties for an object.

Edit

provides selections for copying, pasting, and deleting.

View

provides selections for refreshing the information displayed in the application and for
moving up a level in the navigation tree.

Actions

provides selections that are valid only for the current plug-in. (If no plug-in is selected, the
Actions menu is not present. The Actions menu items are different for each plug-in.)

Tools

provides access to an experimental metadata utility.


CAUTION:

Only experienced administrators should use this utility.


Metadata errors could occur if this utility is used incorrectly.

Roadmaps

provides access to roadmaps, which are user assistance documents designed to guide you
through SAS Management Console tasks.

Help

provides options for selecting help for SAS Management Console or for the current plugin. Help for a specific plug-in is only available when the plug-in is selected in the
navigation tree

4.4 Working with the User Interface

4-17

SAS Management Console User Interface

Toolbar

26

...

The toolbar provides a set of five standard tools for


moving up one level in the navigation tree
opening the selected object
copying
pasting
deleting.
In addition, plug-ins can also add tools to the toolbar. The tools that are specific to a plug-in are only
available when the plug-in is selected in the navigation tree. The plug-in can also provide different tools
depending on the object that is selected under the plug-in. Refer to the Help on each of the plug-ins for
more information about plug-in tools.

4-18

Chapter 4 Overview of the SAS Management Console

SAS Management Console User Interface

Context Bar

27

...

The context bar identifies the active repository, which is the metadata repository to which you are
storing metadata definitions. You can select the repository that you want to access from the Repository
drop-down list.

4.4 Working with the User Interface

4-19

SAS Management Console User Interface

Navigation Tree

28

...

The navigation tree displays an organized list of all of the installed plug-ins and the objects that are
associated with each plug-in. The plug-ins are organized into two main categories:
Environment Management

contains plug-ins for defining metadata that applies to the overall


SAS environment (such as servers, libraries, and metadata repositories).

Application Management

contains plug-ins for defining metadata that applies to specific


applications.

Selecting a plug-in icon in the navigation tree activates the plug-in and displays information for that
plug-in in the display area. To display the objects associated with the plug-in in the navigation tree,
click the plus sign next to the plug-in icon to expand its contents (not all plug-ins are expandable).

4-20

Chapter 4 Overview of the SAS Management Console

SAS Management Console User Interface

Display
Area

29

...

The display area is used to display detailed information about objects selected in the navigation tree. The
information displayed depends not only on the object selected in the navigation tree, but also on the plugin that is active. Some plug-ins (such as the User Manager) utilize the display area for entering metadata.
If you select an object (plug-in or other object) in the navigation tree that contains sub-folders, the display
area lists the folders. If you select a folder in the navigation tree, the display area lists the objects that are
contained in the folder.
If you select an object in the navigation tree that does not contain any sub-folders, the display area
displays any metadata definitions that are associated with that object. For example, if you select a server
definition in the navigation tree, the display area lists all of the connections that have been defined for the
server.

4.4 Working with the User Interface

SAS Management Console User Interface

Status Line

30

...

The status line, at the bottom of the SAS Management Console window, displays the following
information:
number of objects selected or the number of objects contained in the currently selected folder
or plug-in
domain and user ID defined in the metadata profile used to log on to the active metadata server
machine and port number of the active metadata server.

4-21

4-22

Chapter 4 Overview of the SAS Management Console

Assigning a SAS Data Library

This demonstration shows how to use the SAS Management Console to define a data library.

1. Invoke SAS Management Console by selecting Start  All Programs  SAS 


SAS Management Console 9.1.
2. Select the BIArchitecture metadata profile then select

4.4 Working with the User Interface

3. Enter the username and password provided by the instructor.

The values shown above will be different than those used in class.

The SAS Management Console opens:

4-23

4-24

Chapter 4 Overview of the SAS Management Console

Define a SAS Data Library


4. Expand the Data Library Manager plug-in.
5. Right-click on SAS Libraries and select New Library from the pop-up menu. The New Library
Wizard opens.
6. Select SAS Base Engine Library as the type of library to define.

Select

7. Specify Orion Star Gold Library as the Name of the new library.

Select

4.4 Working with the User Interface

4-25

8. Specify the properties of this library:


a. Type orgold in the Libref field.

b. Select

to add a new path to the list of available items.

c. In the New Path Specification window, select

Using the
button only allows you to browse the machine where the SAS
Management Console is running. If the path is located on a different server, it must be
typed in manually.

4-26

Chapter 4 Overview of the SAS Management Console

d. In the Browse window, navigate to C:\Workshop\winsas\sbip\Orion_Star_15AUG03\orgold.

Select

.
in the New Path Specification window.

e. Select
f.

Verify that is path is now in the Selected items list.

Select

4.4 Working with the User Interface

9. If prompted, select SASMain as the SAS Application server.

Select

10. Review the settings:

Select

4-27

4-28

Chapter 4 Overview of the SAS Management Console

11. The new library should now appear in the display area of SAS Management Console.

12. To view the LIBNAME statement that will be created from the metadata, right-click
Orion Star Gold Library and select Display Libname.

Select

4.4 Working with the User Interface

Register Metadata for Existing Tables


When you create metadata to define a library in the SAS
Management Console, you define the library only and not
any tables that it contains.
To import metadata to define an existing data source, use
the Source Designer.

32

Source Designer
The Source Designer is a wizard-driven
interface that enables you to define the
physical layout of existing tables using a
data dictionary or metadata information
from the source system.
The result of running the Source Designer
successfully is a metadata registration
that describes the data source.

33

4-29

4-30

Chapter 4 Overview of the SAS Management Console

Register Metadata for Existing Tables

This demonstration shows how to register the metadata for the tables in the Source Tables Library.
1. To invoke the Source Designer, right-click Orion Star Gold Library and select Import
Tables.
2. Select SASMain as the server to connect to, because it is the server where the data resides.

3. Enter the user name and password provided by the instructor.

Select

4.4 Working with the User Interface

4-31

4. Because the wizard was invoked from the library you want to import tables for, accept the defaults by
selecting
.

to select all the available tables.

5. Select

Select

4-32

Chapter 4 Overview of the SAS Management Console

6. Review the settings.

Select

7. The tables are now listed in the display area of SAS Management Console.

4.4 Working with the User Interface

4-33

Set the Authorization Level for the New Library


The metadata about libraries and tables are available to all users by default; however, access to the data
within a table is not. Permissions must be added for the desired users or group of users to be able to view
the data within a specific table or all tables in a specific library.
8. To set permissions for all tables in the new library, right-click Orion Star Gold Library and
select Properties.
9. When the Properties window opens, select Authorization.

4-34

Chapter 4 Overview of the SAS Management Console

10. On the Authorization tab, grant the Read permission to the PUBLIC group by selecting the
appropriate check box.

11. Select

to save the changes.

12. Select File  Exit to close SAS Management Console.

Chapter 5 Using SAS ETL Studio


5.1

SAS ETL Studio Overview............................................................................................5-3

5.2

The SAS ETL Studio Interface .....................................................................................5-9

5.3

Advanced SAS ETL Studio Features (Self-Study) ....................................................5-84

5.4

Solutions to Exercises ...............................................................................................5-91

5-2

Chapter 5 Using SAS ETL Studio

5.1 SAS ETL Studio Overview

5.1 SAS ETL Studio Overview

What Is SAS ETL Studio?


SAS ETL Studio, a Java application, is a visual design
tool that helps organizations quickly build, implement,
and manage ETL processes from source to destination,
regardless of the data sources or platforms.
Users can standardize metadata across the organization
and perform in-depth transformations with minimal
programming or manual work to meet enterprise data
integration requirements and to support business and
analytic intelligence.

What Is SAS ETL Studio?


SAS ETL Studio enables you to perform the following
tasks:
 the Extraction of data from operational data stores
 the Transformation of this data
 the Loading of the extracted data into your data
warehouse or data mart.

5-3

5-4

Chapter 5 Using SAS ETL Studio

What Is SAS ETL Studio?


SAS ETL Studio is an application that enables you to
manage ETL process flows by allowing:
 specification of metadata for sources, such as tables
in an operational system
 specification of metadata for targets the tables and
other data stores in a data warehouse
 creation of jobs that specify how data is extracted,
transformed, and loaded from a source to a target.

SAS ETL Studio: Change Management


In SAS ETL Studio, the change management facility
enables multiple SAS ETL Studio users to work with the
same metadata repository at the same time without
overwriting each others changes.

5.1 SAS ETL Studio Overview

5-5

An Example of working with change-management in SAS ETL Studio


The following is a general description of what it is like to work under change-management control in
SAS ETL Studio.

When you open a metadata profile whose default repository is change-managed, metadata in the
change-managed repository is displayed in the Inventory tree and the Custom tree. Metadata in the
Project repository is displayed in the Project tree.

The Project tree contains any metadata that has been checked out of the change-managed repository
and any new metadata objects that have been added.

Typically, users will not have the appropriate privilege to directly add or update metadata directly in
a change-managed repository. You must check metadata objects out of and into the change-managed
repository.

To update an existing metadata object that is under metadata source control, use the Inventory tree or
the Custom tree to check out the object from the change-managed repository. The object will appear
in the Project tree, where you can update the object's metadata.

After an object has been checked out by one person, it is locked so that it cannot be updated by
another person until the object has been checked back in.

You do not have to check out a library in order to add metadata about a table in that library.

If two or more parent objects share a common object such as a table, a primary key, a note, or a
document, and you check out one of these parent objects, only you will be able to check out the
other parent objects that share the common object. (Other users will not be able to access the
common object that you have checked out, and the shared object is required in order to check out
a parent object that uses that shared object.) For example, suppose that two jobs use the same source
table. If you check out Job 1, only you will be able to check out Job 2.

When you add a new metadata object, it goes directly into the Project repository. The object will
appear in the Project tree, where you can update the object's default metadata.

The Fetch option is used to get a copy of a metadata object for testing purposes. The copied object is
not checked out, so the original object is not locked. The copied object can be modified, but it cannot
be checked in. Fetched items will remain in the Project repository until they are deleted.

When you are finished working with all objects in the Project repository (and the Project tree), use
the Check In feature to remove the objects from the Project repository and store them in the changemanaged repository. A check-in operation checks in all of the metadata objects that are in the Project
repository. You cannot check in some objects and leave other objects in the Project repository,
therefore it may be convenient to work with small sets of related objects in the Project repository.

To remove a metadata object from the Project repository, use the Delete option or the Undo Check
Out option. To remove a metadata object from both the Project repository and the change-managed
repository, use the Destroy option.

5-6

Chapter 5 Using SAS ETL Studio

SAS ETL Studio: Data Surveyor Wizards


Optional Data Surveyor wizards can be licensed that
provide access to the metadata in enterprise applications,
such as
 PeopleSoft
 SAP R/3
 Siebel
 Oracle Applications.

SAS ETL Studio: Metadata CWM Compliant


The metadata maintained by SAS ETL Studio is CWM
(Common Warehouse Metamodel) compliant and
portable to other CWM-compliant applications. Likewise,
metadata from other CWM-compliant applications (that is,
data modeling tools) can be imported easily into SAS ETL
Studio.

For example, you could use a data modeling tool to create a model for a set of tables, save the model in
CWM format, and then use the Metadata Importer wizard to import the model into a metadata repository.
In SAS ETL Studio, you could view the properties of each table and verify that the appropriate metadata
was imported. The tables could then be used in SAS ETL Studio jobs.

5.1 SAS ETL Studio Overview

SAS ETL Studio: Data Quality


SAS ETL Studio is fully integrated with the data quality
software from DataFlux Corporation. Both products now
use the same Quality Knowledge Base (QKB), which
contains rules, routines, and schemes necessary to
integrate data quality into the ETL process.

The Process Library in SAS ETL Studio contains two data quality transformation templates: Create
Match Code and Apply Lookup Standardization. These templates enable you to increase the value
of your data through data analysis and data cleansing.

Extending SAS ETL Studio Functionality


The SAS ETL Studio functionality is extended by Java
plug-ins packaged with the product.
Further extensions can be implemented by
 writing additional plug-ins
(Java programming required)
 using the Transformation Generator Wizard
(no Java programming required).

10

For details about creating your own Java plug-ins, see the plug-in appendix to the SAS ETL Studio
User's Guide.

5-7

5-8

Chapter 5 Using SAS ETL Studio

Server Connections and SAS ETL Studio


As a client, SAS ETL Studio must connect to a SAS
Metadata Server to read or write metadata. It must
connect to other servers to run SAS code, connect to a
third-party database management system, or to perform
other tasks.

11

Interaction with SAS Application Servers


SAS ETL Studio can use different types of application
servers:
SAS Metadata Server

Required to read and write


metadata in a SAS metadata
repository.

SAS Workspace Server Required to execute SAS code


and access data.
SAS/CONNECT Server

12

Required to submit generated


SAS code to machines that are
remote to the default SAS
application server.
server.
...

5.2 The SAS ETL Studio Interface

5.2 The SAS ETL Studio Interface

SAS ETL Studio: The Interface


SAS ETL Studio is a Java client developed to control the
ETL process. The interface has several ease-of-use
features including
 copy and paste in any text field
 multiple windows can be open at one time (including
multiple process flow diagrams)
 Windows look and feel
 wizard-driven interfaces.

14

Tools, Menus, and Online Help


SAS ETL Studio takes full advantage of toolbars and pulldown menus. The icons available on the toolbar depend
on which window is active from within the interface.

Menus and
Tools

15

5-9

5-10

Chapter 5 Using SAS ETL Studio

The Shortcut Bar


One of the most significant features of SAS ETL Studio
is the new
process-driven
functionality.
Processes are
available via a
Shortcut bar on
the far left side
of the main
SAS ETL Studio
window.

Shortcut Bar

16

The Shortcut Bar


The Shortcut bar is populated with icons for each task an
ETL user would typically perform, including:
Source Designer

defines metadata about the


source(s) for a process.

Metadata Importer

imports metadata from other


applications.

Metadata Exporter

exports metadata to be used by


other applications.

Process Designer

defines metadata about the ETL


processes.

continued...
17

...

5.2 The SAS ETL Studio Interface

The Shortcut Bar


Target Designer

defines metadata about the


target table(s) to be created by
the process.

Options

provides numerous options for


the SAS ETL Studio user to
customize the look and feel of the
application.

...

18

Tree View
The SAS ETL Studio Tree View enables you to
 view the metadata
associated with
the current
metadata
repository
 display different
views or trees
Tree View
of the current
repository.

19

5-11

5-12

Chapter 5 Using SAS ETL Studio

Tree View
There are several tabs available in the tree view area:
Inventory Tree

lists the metadata objects in the


default metadata repository (and
any dependant repositories),
organized by predetermined
groupings.

continued...
20

...

The items in the Inventory tree view are grouped according to a set of predefined groups that an ETL user
will typically define from within SAS ETL Studio (tables, OLAP cubes, jobs, and so on).

Tree View
Custom Tree

lists the metadata objects in the


default metadata repository
(and any dependant
repositories), organized by
useruser-defined groupings of
objects.

continued...
21

...

The items in the Custom tree view are grouped according to whatever groups the ETL user has defined
(Source Tables, Target Tables, Sales Cubes, and so on). These groups could be determined by object
types, intended uses for the objects, data marts, lines of business, and so on.

5.2 The SAS ETL Studio Interface

5-13

Tree View
Process Library Tree

22

lists the available data


transformations to be used in
the ETL process.

...

Selecting one of the transformations creates a template in the process view, with drop zones into which
the user may drag-and-drop items.

Addititional tabs may be available in the tree view area depending on the selected options and
settings.

5-14

Chapter 5 Using SAS ETL Studio

Process Library Tree


The Process Library tree displays a collection of
transformation templates.
There are four collections (folders) of templates that are
provided with SAS ETL Studio:
 Analysis
 Data Transforms
 Output
 Publish.

23

The Analysis folder in the Process Library tree includes the following templates:
Correlations

creates an output table containing correlation statistics

Correlations Report

creates an HTML report containing summary correlation statistics

Distribution Analysis

creates an output table containing a distribution analysis

Distribution Analysis Report

creates an HTML report containing a distribution analysis

Frequency

an output table containing frequency information

Frequency Report

creates an HTML report containing frequency information

Summary Statistics

creates an output table containing summary statistics

Summary Statistics Report

creates an HTML report containing summary statistics

Summary Tables Report

creates an HTML report containing summary tables

5.2 The SAS ETL Studio Interface

The Data Transforms folder in the Process Library tree includes the following templates:
Append

creates a single target table by combining data from several source tables.

Apply Lookup
Standardizations

applies standardization schemes to the source data during the


transformation step.

Create Match Codes

creates match codes for specified source columns.

Data Transfer

moves data directly from one machine to another.

Data Validation

cleanses data before it is added to a data warehouse or data mart.

Extract

selects multiple sets of rows from a source and writes those rows to a
target.

Fact Table Lookup

loads source data into a fact table and translates business keys into
generated keys.

Key Effective Date

enables change tracking in intersection tables.

Mining Results

integrates a SAS Enterprise Miner model into a SAS ETL Studio data
warehouse. Typically used to create target tables from a SAS Enterprise
Miner model.

Return Code Check

provides status-handling logic at a desired point in the process flow


diagram for a job.

SAS Rank

ranks one or more numeric variables in the source and stores the ranks in
the target.

SAS Sort

reads data from a source, sorts it, and writes the sorted data to a target.

SAS Splitter

selects multiple sets of rows from one source and writes each set of rows
to a different target.

SCD Type 2 Locator

loads source data into a dimension table, detects changes between source
and target rows, updates change tracking columns, and applies generated
key values. This transformation implements slowly changing dimensions.

SQL Join

selects multiple sets of rows from one or more sources and writes each set
of rows to a single target.

Standardize

an output table containing data standardized to a particular number.

Surrogate Key
Generator

loads a target, adds generated whole number values to a surrogate key


column, and optionally sorts and saves the source based on the values in
the business key column(s).

Transpose

creates an output table containing transposed data.

User-Written Code

retrieves a user-written transformation.

5-15

5-16

Chapter 5 Using SAS ETL Studio

The Output folder in the Process Library tree contains the following template:
List Data

creates an HTML report containing selected columns from a source table

The Publish folder in the Process Library tree includes the following templates:
Publish to Archive

creates an HTML report and an archive of the report

Publish to Email

creates an HTML report and emails it to a designated address

Publish to Queue

creates an HTML report and publishes it to a queue using MQSeries

5.2 The SAS ETL Studio Interface

Process Designer View


The Process Designer window is the workspace for
building ETL processes. The Process Designer view
appears as a final step in the Process Designer wizard.
Once the process is defined, the Process Designer view
is populated with icons that represent the chosen
processes.
The Process Designer window can be used to
 view SQL source code
 review the SAS log (from submitting jobs)
 view the resulting output from running a SAS job.

24

Process Designer and Overview Windows


Process
Designer
View
Overview
window

25

...

5-17

5-18

Chapter 5 Using SAS ETL Studio

Overview Window
The Overview window shows you the complete process
from the process view.
From within the Overview window, you can control which
part of the process is displayed in the Process View
window.

26

SAS ETL Studio Wizards


There are shortcuts which invoke wizards that aid the
user in performing various tasks with SAS ETL Studio.
Some of these wizards are
 Source Designer
 Target Designer
 New Job.

27

5.2 The SAS ETL Studio Interface

Source Designer
The Source Designer is a wizard-driven
interface that enables you to define the
physical layout of existing tables using a
data dictionary or metadata information
from the source system.
The result of running the Source Designer
successfully is a metadata registration
that describes the data source.

28

Unlike the SAS Warehouse Administrator product, which requires that you create Operational Data
Definitions (ODDs) one table at a time, the Source Designer enables you to input the metadata from
multiple tables with one pass through the wizard.
If the table is stored in an ERP System, the corresponding Data Surveyor will be invoked. The Data
Surveyor contains information about the metadata of the source system.
If the table is a flat file, you can use a wizard to define the record layout.
The Source Designer can be invoked by following these steps:
Click on the Source Designer icon from the Shortcut bar.
Select Tools  Source Designer.
Right-click on the Source Tables group and select New Object  Source Table.

5-19

5-20

Chapter 5 Using SAS ETL Studio

Target Designer
The Target Designer is a wizard that
allows metadata to be entered for a target.
In designing the target table, you can
 access any metadata about any
source tables and columns registered
in the metadata repository
 override any metadata that was
imported from another source and add
new columns to the target table
 create indexes on the target table
being created.

29

The target designer can also specify


the location of the target table
table-specific options to be stored in the metadata.
The Target Designer can be invoked by following these steps:
Click on the Target Designer icon from the Shortcut bar.
Select Tools  Target Designer.
Right-click on the Target Tables group and select New Object  Target Table.

5.2 The SAS ETL Studio Interface

Target Designer
The person designing the target table has full control over
the type of table being built.
The types of targets that can be built include
 database types that are supported by the
SAS/ACCESS products
 SAS data sets (including both data files and data views)
 SAS/SHARE data sets
 SPDE tables.

30

SPDE Scalable Performance Data Engine

5-21

5-22

Chapter 5 Using SAS ETL Studio

New Job Wizard


The New Job wizard enables you to
define the metadata necessary to run an
ETL process to load data into a target or
targets.

31

An empty job can be created, without importing metadata from any predefined target table, by clicking
without selecting the metadata for a table. Objects from the tree view can then be dragged
and dropped into the empty job.

You can invoke the New Job wizard by following these steps:
Click on the Process Designer icon from the Shortcut bar.
Select Tools  Process Designer.
Right-click on the Jobs group and select New Object  Job.

5.2 The SAS ETL Studio Interface

5-23

Additional Wizards
Other wizards available to provide assistance with various
tasks in SAS ETL Studio include
 Metadata Importer
 Metadata Exporter
 Cube Designer
 Transformation Generator wizard.
You can also install optional data surveyor wizards, which
provide access to the metadata in enterprise applications,
such as PeopleSoft, SAP R/3, Siebel, and Oracle.

32

These wizards can be invoked from the Shortcut Bar or the Tools pull-down menu of SAS ETL Studio:
Metadata Importer

enables you to import metadata from other applications that support the
Common Warehouse Metamodel (CWM) format. Optional bridges are
available for other formats.

Metadata Exporter

enables you to export metadata to other applications that support the Common
Warehouse Metamodel (CWM) format. Optional bridges are available for other
formats.

Cube Designer

is a target designer that enables you to create a cube, a data store that supports
Online Analytical Processing.

Transformation
Generator

enables you to create a user-written, SAS code transformation and make it


available in the Process Library tree.

5-24

Chapter 5 Using SAS ETL Studio

Options Window
The Options window can be used to define standard
settings for the SAS ETL Studio interface.
There are several tabs in the Options window:
 General
 Process
 Editor
 Metadata Tree
 SAS Server
 Data Quality.

33

Using the Options window tabs, you can control the following:
General

controls the overall display of SAS ETL Studio and the functionality of the wizards.

Process

controls the look and feel of the process editor window.

Editor

controls the look and feel of the SAS text editor for generated code.

Metadata Tree

controls the tree view in the middle portion of SAS ETL Studio.

SAS Server

specifies the SAS server to be used with SAS ETL Studio, and tests the connection to
the server.

Data Quality

specifies options to control the locale, the types of files to be used by the data quality
plug-ins, and the location of the Quality Knowledge Base (QKB).

5.2 The SAS ETL Studio Interface

Course Case Study Tasks


Recall the case study tasks diagram discussed earlier.
Each of these tasks involves either reading or writing (or
both) metadata.
Define
Data Libraries

Create
Stored Processes

Register
Source Tables

View and Analyze


Data

Define
Target Tables

Metadata

Create
Information Maps

Create
ETL Jobs

Create Reports

Create
OLAP Cubes

Use the Information


Delivery Portal

34

SAS ETL Studio Case Study Tasks


SAS ETL Studio will concentrate on the following four
tasks:
Define
Data Libraries

Create
Stored Processes

Register
Source Tables

View and Analyze


Data

Define
Target Tables

35

Metadata

Create
Information Maps

Create
ETL Jobs

Create Reports

Create
OLAP Cubes

Use the Information


Delivery Portal

5-25

5-26

Chapter 5 Using SAS ETL Studio

SAS ETL Studio Case Study


These tasks will be performed in sequence:
1.

Define
Data Libraries (+)

2. Define Source
Tables Metadata
3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

36

SAS ETL Studio Case Study Setup Tasks


1.

Define
Data Libraries (+)

Build Custom Tree Groupings


Demo

Libraries
2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

Jobs
Source Tables
Target Tables


Exercises

Define Additional Library Definitions


Target Tables Library
Source Tables Library

37

Demo

Exercises

...

5.2 The SAS ETL Studio Interface

SAS ETL Studio Case Study Define Sources


1.

Define
Data Libraries (+)

2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

The Source Designer defines


metadata for the source tables.

Orders

Demo

Order_Item
Exercises
Product_List

...

38

SAS ETL Studio Case Study Define Targets


1.

Define
Data Libraries (+)

2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

The Target Designer defines


metadata for the target tables.

OrderFact

ProductDim

Demo*

Exercises

* Some derived columns for OrderFact


are completed in the exercises.
39

...

5-27

5-28

Chapter 5 Using SAS ETL Studio

SAS ETL Studio Case Study Define Jobs


1.

Define
Data Libraries (+)

2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

The Process Designer defines


metadata for jobs that contain the
process flow diagrams necessary
to load the target tables.
Populate the
OrderFact table

40

Populate the
ProductDim table

Demo

Exercises

...

Creating the OrderFact Table


The OrderFact table will be created from the Orders and
Order_Item tables.
Target Table

Source Tables

41

...

5.2 The SAS ETL Studio Interface

Creating the OrderFact Table


The source tables, Orders and Order_Item, will be
combined using the SQL Join transformation.

SQL Join

 The SQL Join will be

used to define computed


columns.

...

42

Creating the OrderFact Table


The table that is the result of the SQL Join will then be
loaded into the OrderFact table.

Loader

43

...

5-29

5-30

Chapter 5 Using SAS ETL Studio

Creating the ProductDim Table


The ProductDim table will be created from the
Product_List table.
Target Table

Source Table

...

44

Creating the ProductDim Table


The Extract transformation will be used so that a
computed column can be defined.

SAS Extract

45

...

5.2 The SAS ETL Studio Interface

Creating the ProductDim Table


The results of the Extract transformation will then be
loaded into the target table, ProductDim.

Loader

...

46

SAS ETL Studio Case Study Setup Tasks


1.

Define
Data Libraries (+)

Build Custom Tree Groupings


Demo

Libraries
2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

Jobs
Source Tables
Target Tables


Exercises

Define Additional Library Definitions


Target Tables Library
Source Tables Library

47

Demo

Exercises

5-31

5-32

Chapter 5 Using SAS ETL Studio

Create a Logical Grouping and Adding a Library Definition

This demonstration shows how to create a logical grouping in the Custom tree view to organize your
warehouse metadata. It also shows how to create a library definition and store it in the new logical group.

1. Invoke SAS ETL Studio by selecting Start  All Programs  SAS  SAS ETL Studio 9.1.
2. Select the metadata profile BIArchitecture, then select

5.2 The SAS ETL Studio Interface

3. If prompted, enter the username and password provided by the instructor.

Select

The SAS ETL Studio desktop opens:

Select

to close the Tip Of The Day window.

5-33

5-34

Chapter 5 Using SAS ETL Studio

The first step in using SAS ETL Studio to build the Orion Star marketing data mart is to create groups
in the Custom tree view. These groups are simply logical groupings of the metadata that comprise the
repository. There is no corresponding physical file structure for the groups that are created. The groups
can be defined using whatever logical grouping is relevant to your organization.
4. Select the Custom tab in the tree view area of SAS ETL Studio.
5. Select

to expand the Foundation repository.

The Foundation repository already has an Ungrouped group, which already contains several items.
These were created during the configuration of the SAS Intelligence Architecture. Do not delete
these files, as some will be used in future demonstrations and exercises.
6. Right-click Foundation and select New Group from the pop-up menu. The default name of the new
group is Untitled.

5.2 The SAS ETL Studio Interface

7. Rename the new group to Libraries.


a. Right-click on the Untitled group.
b. Select Rename from the pop-up menu.
c. Type Libraries as the new name for the group.

5-35

5-36

Chapter 5 Using SAS ETL Studio

Add a Library Definition


8. From the Custom tab in the tree view area of the SAS ETL Studio desktop, select File 
New Object.
9. In the New Object Wizard, select Library type, then

5.2 The SAS ETL Studio Interface

10. Under SAS Libraries, choose SAS Base Engine Library, then select

11. Type Target Tables Library in the Name field and select

5-37

5-38

Chapter 5 Using SAS ETL Studio

12. Type Target in the Libref field, select BASE in the Engine field (default), then click
define a new path because what you want is not in the list of available items.

to

to select the path C:\Workshop\winsas\sbiovr\DataMarts. The DataMarts


13. Choose
directory does not exist and must be created on the operating system. This can be done from the
.
Browse window by selecting

Remember: Using the


button only allows you to browse the machine where the
SAS Management Console is running. If the path is located on a different server, it must by
typed in manually.
The path must physically exist on the operating system.

5.2 The SAS ETL Studio Interface

14. Select
items list.

Select

5-39

to close the Browse window. Verify the path selected above is now in the Selected

5-40

Chapter 5 Using SAS ETL Studio

15. Select SASMain as the server, then

16. Review the information and select

5.2 The SAS ETL Studio Interface

The library definition is added to the Ungrouped group.

5-41

5-42

Chapter 5 Using SAS ETL Studio

17. Move the new library to the Libraries group using one of the methods below:
Click on Target Tables Library, drag-and-drop it on top of the Libraries group.
Right-click on Target Tables Library, select Group, expand Foundation, select
Libraries, select

5.2 The SAS ETL Studio Interface

5-43

Exercises

Create several logical grouping in the Custom tree view to organize your warehouse metadata.

If you did not follow along with the demonstration, complete the steps of the demonstration to define the
Libraries group and Target Tables Library.
1. Create Logical Groups
Create the following logical groups:
Source Tables
Target Tables
Jobs
Libraries (if you did not follow along with the demonstration).
2. Add Library Definitions
Use the New Library Wizard to create a metadata definition for the following libraries and move them
to the appropriate group:
Library Name:

Source Tables Library

Libref:

Srcdata

Library Type:

SAS Base Engine Library

Path:

C:\Workshop\winsas\sbip\Orion_Star_15AUG03\ordetail

Server:

SASMain

5-44

Chapter 5 Using SAS ETL Studio

Library Name:

Target Tables Library


(if you did not follow along with the demonstration)

Libref:

Target

Library Type:

SAS Base Engine Library

Path:

C:\Workshop\winsas\sbiovr\DataMarts


Server:

This path needs to be created.

SASMain

5.2 The SAS ETL Studio Interface

5-45

Using the Source Designer


The Source Designer is a wizard that generates metadata
for one or more selected tables, based on the physical
structure of the table(s)
The Source Designer can be used to specify metadata for
any existing table, not just tables used as data sources for
ETL jobs.

50

The Source Designer supports a number of specific data formats that have been licensed for your
site. The specific format will often give better results than the generic format, which has not been
optimized for particular kinds of data. Use the format that most closely matches your data
whenever possible.

Using the Source Designer


The Source Designer is an easy to use wizard interface.

51

...

5-46

Chapter 5 Using SAS ETL Studio

SAS ETL Studio Case Study Define Sources


1.

Define
Data Libraries (+)

2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

The Source Designer defines


metadata for the source tables.

Orders

Demo

Order_Item
Exercises
Product_List

52

5.2 The SAS ETL Studio Interface

5-47

Add a Source Table Definition

The next step in the implementation of the Orion Star marketing data mart is to define the source table to
be used in the ETL process.

1. Select Source Designer from the Shortcut bar of the SAS ETL Studio desktop.
2. Select SAS as the metadata import source type.

Select

5-48

Chapter 5 Using SAS ETL Studio

3. Select Source Tables Library as the SAS Library.

Select

to access the Define Tables window.

4. Select the source table ORDERS from the Select Tables list.

Select

to access the Select Group window.

5.2 The SAS ETL Studio Interface

5. Select the Source Tables group.

Select

to access the Wizard Finish window.

6. Verify that the information is correct, then select

5-49

5-50

Chapter 5 Using SAS ETL Studio

Exercises

Create the source table metadata for several source tables.

3. Add Source Table Definitions


Create source table metadata definitions for the following tables from the Source Data Tables library:
Orders (if you did not follow along with the demonstration)
Order_Item
Product_List.

5.2 The SAS ETL Studio Interface

Using the Target Designer


The Target Designer is a wizard that can create new
metadata about a single table that might or might not
already exist in physical storage.
It can also be used to create and edit metadata about an
OLAP cube.

55

Using the Target Designer


The Target Designer is an easy to use wizard interface.

56

...

Selecting Cube Designer in the first window of the Target Designer will launch the Cube Designer
wizard, which is discussed in the next chapter.

5-51

5-52

Chapter 5 Using SAS ETL Studio

SAS ETL Studio Case Study Define Targets


1.

Define
Data Libraries (+)

2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

The Target Designer defines


metadata for the target tables.

OrderFact

ProductDim

Demo*

Exercises

* Some derived columns for OrderFact


are completed in the exercises.
57

5.2 The SAS ETL Studio Interface

Add a Target Table Definition

The next step in the implementation of the Orion Star marketing data mart is to use the Target Table
Designer to define the target tables for the ETL process.

1. Select Target Designer from the Shortcut bar of the SAS ETL Studio desktop.
2. Select Target Table as the type of target to design.

Select

5-53

5-54

Chapter 5 Using SAS ETL Studio

3. Type OrderFact for the name of the target table.

Select

can be used to display the interface where you can specify notes, user
responsibilities, table attributes, and extended attributes for the target table you are defining.

5.2 The SAS ETL Studio Interface

4. Move the following column definitions to the Selected Columns list:


ORDER_ITEM table

Order_ID
Product_ID
Quantity
Total_Retail_Price
CostPrice_Per_Unit
Order_Type

ORDERS table

Order_Date
Delivery_Date

Select

5-55

5-56

Chapter 5 Using SAS ETL Studio

5. Review and verify the metadata that was imported for each of the columns.

To add an additional column definition, select


To remove a column definition, select

.
.

To define (or modify) indexes for the target table, select

Several index types can be created:


Simple consists of a single column.
Composite consists of two or more related columns.
Unique is an index (simple or composite) that is required to have a unique value in
each row.
Additional metadata items can also be specified for each column:
Summary Role

defines the role of the column in summary data

Sort Order

defines how the values in the column are sorted

Informat

defines the SAS informat to be used in reading the data.

Format

defines the SAS format to be used in writing the data.

Is Nullable

indicates whether or not the column can contain null or missing values.

Select

5.2 The SAS ETL Studio Interface

5-57

6. Select Target Tables Library for the Library field.

The type of file selected in the DBMS field controls the type of storage intended to be utilized
for the new target table. The selection arrow shows a list of DBMSs that are valid in the
current context (that is, SAS, Oracle, SAP, Sybase, and so on).
To add a new library definition, select

.
To edit an existing library definition, select
To specify encryption, compression, or other valid SAS data set or view options, select
.

Select

5-58

Chapter 5 Using SAS ETL Studio

7. Verify that the information is correct, then select

The metadata definition for the target table OrderFact is now defined.
8. Move the table OrderFact to the Target Tables group.

5.2 The SAS ETL Studio Interface

5-59

Updating Table Metadata


It is possible to update a defined table in the metadata repository with additional information. The
following demonstrates adding additional columns this could have been done during the initial
specifications but can also be done at a later point.
9. From the Custom tab in the tree view area of SAS ETL Studio, expand the Target Tables group.
10. Right-click on the OrderFact table and select Properties from the pop-up menu.
11. In the OrderFact Properties window, select the Columns tab.

12. Select the Delivery_Date row so that the new columns will be added to the end of the list.

New columns are added after the row of information that is currently selected.

13. Select

, a new row for an additional column definition appears.

a. Type Order_Year in the Name field.


b. Advance to the Description field by using the Tab key or by clicking in the field. Enter
Year Order was Placed as a description.
c. Advance to the Type field and select Numeric.

A valid SAS variable name starts with a character and has a maximum of 32 characters.
A valid length is 2 to 8 for numeric types and up to 32,767 for character types. The
description is the label that gets associated with the column when it is displayed in
selection lists in SAS ETL Studio or other SAS applications.

5-60

Chapter 5 Using SAS ETL Studio

14. Repeat the steps above to add the following new columns:
Name

Description

Type

Order_Qtr

Quarter Order
was Placed

numeric

Order_Month

Month Order
was Placed

numeric

Delivery_Time

Number of
Days Until
Delivery

numeric

15. Select

to close the Properties window and save the changes.

5.2 The SAS ETL Studio Interface

5-61

Exercises
Create the target table metadata for several target tables.

4. Add the OrderFact Target Table Definition (if you did not follow along with the demonstration)
Create metadata for the OrderFact target table in the Target Tables group.
Define the following new columns to the OrderFact table:
Name

Description

Type

Order_Year

Year Order was Placed

numeric

Order_Qtr

Quarter Order was Placed

numeric

Order_Month

Month Order was Placed

numeric

Delivery_Time Number of Days Until Delivery

numeric

5. Add the ProductDim Target Table Definition


Create metadata for the ProductDim target table in the Target Tables group. It should contain the
following columns of data from the Product_List source table:
Product_ID
Product_Name
Product_Ref_ID
Product_Group (Character, length 45)
Hint:

The Product_Group column must be added manually to the target table metadata.
Metadata for the rest of the columns can be imported from the Product_List source table.

5-62

Chapter 5 Using SAS ETL Studio

Using the Process Designer


The Process Designer invokes the New Job wizard to
create metadata about a job. That metadata is used to
build a process flow diagram for the job.
A job is a metadata object that specifies processes that
create output. SAS ETL Studio organizes sources,
targets, and transformations into jobs that can be
displayed in a process flow diagram.
SAS ETL Studio uses each job to generate and/or retrieve
SAS code that reads sources and creates targets on a file
system.

60

The New Job wizard can also be used to create an empty job. After you have an empty job, you can create
a process flow diagram by dragging and dropping tables and transformations into the Process Designer
window.

Using the Process Designer


The New Job wizard prompts for information that is used
to build a template in the Process Designer.

61

...

5.2 The SAS ETL Studio Interface

SAS ETL Studio Case Study Define Jobs


1.

Define
Data Libraries (+)

2.

Define Source
Tables Metadata

3.

Define Target
Tables Metadata

4.

Define and
Run Jobs

The Process Designer defines


metadata for jobs that contain the
process flow diagrams necessary
to load the target tables.
Populate the
OrderFact table

62

Populate the
ProductDim table

Demo

Exercises

5-63

5-64

Chapter 5 Using SAS ETL Studio

Defining a New Job

At this point, source tables have been defined and the data in those tables can be viewed. Target table
definitions have also been specified, but no data exists in any of the target tables. The next task is to
define a job, where metadata can be specified that will allow the extraction, transformation and loading
of the source table data to the target tables.

1. Select Process Designer from the Shortcut bar of the SAS ETL Studio desktop. This activates the
New Job wizard.

5.2 The SAS ETL Studio Interface

2. Type Populate the OrderFact Table in the Name field.

Select

5-65

5-66

Chapter 5 Using SAS ETL Studio

3. Select OrderFact from the Select Tables list.


Select

Tables can have similar names make sure to select OrderFact and not Order_Fact.
.

5.2 The SAS ETL Studio Interface

4. Verify that the information is correct, then select

5-67

This completes the steps for the New Job wizard, writes the job metadata to the repository and opens
the Process Designer window.

In the Process Designer window, there should be an icon for the OrderFact target table, the Loader
icon, and an empty icon labeled Place table or transform here.
The Place table or transform here icon is simply a placeholder for the source data you intend to load
into the target table. This could be used for a single table, multiple tables, or a transformation.
The Loader icon represents the physical loading of data into the target table. The load process
metadata can be accessed via the properties of the Loader icon.

5-68

Chapter 5 Using SAS ETL Studio

The target table icon should reflect the table that will be loaded when the job is run and is added
automatically if you specified a target table in the New Job wizard.
In this demonstration, you want to load the OrderFact table by using an SQL Join to the Orders and
Order_Item source tables.
5. Select the Process Library tab in the tree view area of SAS ETL Studio.
6. Expand the Data Transforms folder and locate the SQL Join transformation.

7. Drag the SQL Join transformation to the Process Designer window and drop it in the area labeled
Place table or transform here.

5.2 The SAS ETL Studio Interface

The Process Designer view will update to show the SQL Join transformation and two new
placeholders for the tables to be joined.

If you want to simply load a single source data table into the target data table, then
you can drag and drop the table from the Source Tables group into the icon
labeled Place table or transform here. If a more complex data transformation is
required, you can drag and drop one of the supplied data transformations (from
the Process Library tab) into the empty icon.

8. From the Custom tab of the tree view area, locate the Source Tables group element and expand.
9. Drag the table ORDERS onto one of the Place table or transform here boxes.
10. Drag the table ORDER_ITEM onto the other Place table or transform here box.

To add additional tables to an SQL Join, drag and drop the additional tables onto the
SQL Join icon.

11. Right-click on the SQL Join icon and select Properties.

5-69

5-70

Chapter 5 Using SAS ETL Studio

12. Select the Mapping tab.

Notice the name of the target table. This is a temporary table that will be used as input for
the next step of the process. At this point, this is not the final target table that you will load.

5.2 The SAS ETL Studio Interface

5-71

The temporary target table does not have the new columns that you created in the OrderFact table. You
can add them here by right-clicking in the background of the target table variable list, selecting
New Column and manually entering the column attributes. Because you have already defined those
columns, you can simply import that metadata here without having to enter the information manually,
again. Importing the column metadata also ensures consistency.
13. Right-click in the background of the Target table variable listing and select Import Columns from
the pop-up menu.
14. Expand the repository Foundation, the group Target Tables , and the table OrderFact and move the
variables Order_Year, Order_Qtr, Order_Month and Delivery_Time to the Selected Columns list.

Select
tab.

. These additional variables now show up in the Target table list on the Mapping

5-72

Chapter 5 Using SAS ETL Studio

You now need to derive mappings for each of the new columns. There are no columns in the source table
that can be mapped directly to the new target table columns, but you can derive a value from the columns
that do exist in the source table.
15. Right-click Order_Year and select Expression from the pop-up menu.
16. In the Expression Builder window, select Date and Time to display a listing of all date/time
functions. Double-click the Year(date) function (or select it and click

).

The Expression Text field is populated with the function syntax and the placeholder for the argument
is highlighted.

An expression can be typed directly into the Expression Text window, or it can be built by
using the functions, data sources, and buttons within the Expression Builder.

5.2 The SAS ETL Studio Interface

5-73

17. To fill the high-lighted place holder (<numValue>) with a valid column, select the Data Sources tab.
Expand the ORDERS table and select Order_Date.
Select

. The Expression Text field updates to: YEAR(ORDERS.Order_Date).

5-74

Chapter 5 Using SAS ETL Studio

18. Select

Select

to return to the SQL Join Properties window. A warning message may appear:

to close the message window and update the mappings.

5.2 The SAS ETL Studio Interface

5-75

Exercises

In this exercise, you will define a job and enter metadata that will allow the extraction, transformation,
and loading of the source table data to the target tables.

6. Define a Job to Load the OrderFact Table


If necessary, follow the steps from the previous demo (steps 118) to create the job for the
OrderFact target table and to update the mapping information.
Continue updating the mappings for the remaining three columns:
Order_Qtr

Qtr(Order_Date)

Order_Month

Month(Order_Date)

Delivery_Time

Delivery_Date - Order_Date (subtraction)

5-76

Chapter 5 Using SAS ETL Studio

The resulting mapping tab should look like the following:

Select
to close the SQL Join Properties window and return to the Process Designer
window.
or File  Close.
Close the Process Designer window and save the changes by selecting
Move the Populate the OrderFact table job to the Jobs group in the Custom tab
of the tree view.

IMPORTANT: Make sure to close the Process Designer window and save the changes
before continuing on to the next step.

5.2 The SAS ETL Studio Interface

5-77

7. Define a Job to Load the ProductDim Table


Create a new process definition (job) in the Jobs group for the ProductDim table.
Name the job Populate the ProductDim table.
Add an Extract (from the Process Library tree) to the process definition for the ProductDim target
table.

The ProductDim table contains a new column that does not exist in the source tables and
must be derived. Derived expressions cannot be done as part of the step to load the job.
The Extract data transformation will extract data and allow expressions to be derived
for new columns.
Add Product_List from the Source Tables group as the input source for the Extract.
Add a new column to the Extract and derive expressions (in the Extract properties, Mappings tab):
Import Product_Group from the ProductDim target table
Create an expression to load the Product_Group column by reading the value in
Product_Ref_ID and writing it out using the product. user-defined format.
HINT: The PUT function can be used to read a data value from a column and write it out using
a custom format - put(Product_Ref_ID, product.).

The format name product. will need to be typed manually (do not forget the .).

Move the new job from the Ungrouped group to the Jobs group.

5-78

Chapter 5 Using SAS ETL Studio

Loading the Target Table

The final step to be performed is the loading of the target tables.

1. Open the Process Designer window for the Populate the OrderFact Table job by expanding the Jobs
group (on the Custom tab of the tree view). Right-click on the Populate the OrderFact Table job
and select View Job (or double-click the job).
2. Right-click on the Loader icon and select Properties.
3. Select the Load Technique tab and specify a Load Technique of Refresh.

5.2 The SAS ETL Studio Interface

5-79

4. Activate the Drop Table radio button.

The valid options for Load Technique are as follows:


Refresh

removes all the rows from the target and copies all the rows from the source into the target

Append

appends the rows from the source to the end of the target

Update

inserts any rows that are in the source but not in the target

The Before Loading options can affect performance when loading data into the target table:
Drop Table

deletes and re-creates the entire target. Selecting Drop Table minimizes the
physical size of the target

Truncate Table

marks existing rows as deleted and retains those rows in physical storage. New
rows are appended to the existing rows

Drop Indexes

specifies that any indexes on the table are to be deleted before loading. The
appropriate indexes are then re-created after loading based on target metadata

For information on additional options, see the online help for the Loader Properties window.

5-80

Chapter 5 Using SAS ETL Studio

5. Select the Mapping tab. To map the new columns created earlier, right-click in the Target table area
and select Quick Map.

6. Select

Quick Map works only if the columns specified for both the source and target have the same
metadata attributes. If this is not the case, 1-1 mappings can be created by selecting the
column in the source area, selecting the column in the target area, then right-clicking and
selecting New Mapping from the pop-up menu.
to return to the Process Designer window.

5.2 The SAS ETL Studio Interface

5-81

7. To load the target table, submit the job by right-clicking in the background of the Process Designer
window, then select Submit from the pop-up menu (a status window displays while processing is
occurring).

8. If the Source Code Execution window closes without displaying any error message, the job ran.
Select the Log tab at the bottom of the Process Designer to view the log information from this job.

Warning messages from the APPEND procedure (the last step in the code) are expected.

9. Close the Process Designer window by selecting File  Close and save the changes if prompted.

5-82

Chapter 5 Using SAS ETL Studio

10. To view the data, right-click on the OrderFact table in the Target Tables group (on the Custom tab
from the tree view). Select View Data from the pop-up menu.

Scroll to the right when viewing the data to make sure that the derived expressions for the
new columns resulted in valid data.

11. To close the View Data window, select File  Close.

5.2 The SAS ETL Studio Interface

5-83

Exercises

In this exercise, you complete the final step of creating the ETL job, loading the target table.

8. Loading Data into the OrderFact Target Table


Complete steps 111 of the demonstration above (if you did not follow-along during the
demonstration).
9. Loading Data into the ProductDim Target Table
Load the target table ProductDim.
Edit the Loader properties for the process defined.
In the Load Technique tab, set the load technique to Refresh and Drop Table before loading.
In the Mapping tab, be sure and create mappings for each of the new columns created (using
manual mapping or Quick Map).
Submit the job to load the data into the ProductDim table by right-clicking in the background of
Process Designer and selecting Submit from the menu.
Click on the Log tab and make sure there were no errors in the job.
View the data to make sure it loaded correctly.

5-84

Chapter 5 Using SAS ETL Studio

5.3 Advanced SAS ETL Studio Features (Self-Study)

Data Quality Plug-Ins


SAS ETL Studio contains two data quality transformation
templates in the Process Library tree:
Create Match
Code

Used to create a job that creates match


codes and cluster numbers for a
specified source column and based on
a set of criterion.

Apply Lookup Used to create a job that standardizes


Standardization the values of a source column
according to the contents of a specified
standardization scheme.
These templates increase the value of data through data
analysis and data cleansing.
...

69

Data Quality Plug-Ins


To use the data quality transformation templates,
 the SAS Data Quality Server software must be installed
 a SAS application server must be configured to access
a Quality Knowledge Base
 the Quality Knowledge Base must contain the locales
needed to reference data quality jobs.
When the prerequisites have been met, the data quality
transformations can be dragged into process flow
diagrams.

70

5.3 Advanced SAS ETL Studio Features (Self-Study)

Create Match Code Plug-In


The Create Match Code plug-in is a tabbed dialog box
that
 reads the Quality Knowledge Base for the specified
locale
 creates match codes based on the user-specified
criterion.
The match code can then be used to de-duplicate data or
join data as part of the transformation step in defining the
target table.

71

Apply Lookup Standardization Plug-In


The Apply Lookup Standardization plug-in is a tabbed
dialog box that
 reads the Quality Knowledge Base for the specified
locale
 loads all of the available standardization schemes.
You can then apply the scheme to one of the source
columns as part of the transformation step in defining the
target table.

72

5-85

5-86

Chapter 5 Using SAS ETL Studio

Metadata Import Wizard


The Metadata Import Wizard is an interface for importing
metadata files that are compliant with the Common
Warehouse Metamodel (CWM) standard.
By using the Import Wizard to import the metadata from
a previously defined data model (source tables or target
tables), you do not have to enter the metadata for each
table individually. You simply reference a location for the
model file, which was created by a third-party modeling tool.

73

Which Metadata Can Be Imported?


The CWM standard for metadata
was developed by Object
Management Group (OMG).
More information about OMG and the CWM metadata
standard can be obtained from: http://www.omg.org
More information about Meta Integration Technology, Inc.,
and the purchase of MIMBs, can be obtained from the
following location: http://www.metaintegration.net

74

5.3 Advanced SAS ETL Studio Features (Self-Study)

Metadata Export Wizard


The Metadata Export Wizard is an interface for exporting metadata
from within SAS ETL Studio to third-party CWM-compliant
applications.
The user has the ability to specify the path and the file to create from
the export of the metadata.
Once the user completes the Metadata Exporter wizard, a
confirmation window verifies all of the selections the user has made
for the export of the metadata. Upon exiting this window, the
metadata is written to the external file that was specified in the
wizard.

75

Change Management
SAS ETL Studio enables you to create metadata objects
that define sources, targets, and the transformations that
connect them. These objects are saved to one or more
metadata repositories.
The change management feature (or more specifically,
metadata source control) enables multiple SAS ETL
Studio users to work with the same metadata repository at
the same time without overwriting each other's changes.

76

5-87

5-88

Chapter 5 Using SAS ETL Studio

Change Management
Change management features in SAS ETL Studio include:
 menus that support change management operations
such as check out and check in
 the Inventory tree and the Custom tree for working
with metadata that is contained in a change-managed
repository
 the Project tree for working with metadata that is
contained in a project repository
 an audit history for each metadata object.

77

5.3 Advanced SAS ETL Studio Features (Self-Study)

5-89

Change Management Pop-Up Menu


The change management pop-up menu is used to perform change management tasks. The change
management pop-up menu becomes active when a metadata profile is opened in which the default
repository is a project repository. One way to display this sub-menu is to open the Inventory tree, the
Custom tree, or the Project tree, then right-click an object in the tree.
The following are valid items on the pop-up menu:
Check Out

Active in the Inventory tree or the Custom tree. Copies the metadata for one or
more objects from a change-managed repository into the project repository.
Locks the objects in the change-managed repository.

Check In Repository

Active when you select the project repository icon in the Project tree. Moves
all metadata from the project repository to the appropriate change-managed
repository.

Undo Checkout

Active in the Project tree. "Undoes" the check-out state of the selected object.
After you complete this action, the object is removed from the project
repository and is no longer checked out.

Destroy

Active for checked-out objects in the Project tree. The object is deleted from
the project repository, and upon check in, it is also deleted from the
appropriate change-managed repository. You cannot undo a Destroy operation.
Make sure that the object to be destroyed is not required in any SAS ETL
Studio job.

Fetch

Active in the Inventory tree or the Custom tree. Use to get a copy of a
metadata object for testing purposes. The copied object is not checked out
from the change-managed repository, so the original object is not locked. The
copied object can be modified, but it cannot be checked in. Fetched items will
remain in the project repository until they are deleted.

Add to Project

Active in the Project tree. Displays the Check Out wizard, which copies the
metadata for one or more objects from a change-managed repository into the
project repository. Locks the objects in the change-managed repository.

History

Active for some objects in the Inventory tree, the Custom tree, and the Project
tree. Lists all change management transactions for the selected object.

5-90

Chapter 5 Using SAS ETL Studio

Change Management
After an object has been checked out by one person, it
is locked so that it cannot be updated by another person
until the object has been checked back in.
The only people who can change the metadata in a
change-managed repository are
 the person who started the metadata server
 administrators who have write access to the repository
 any users who are authorized to use a project repository
for the change-managed repository.

78

5.4 Solutions to Exercises

5-91

5.4 Solutions to Exercises


1. Create Logical Groups
a. Select the Custom tab in the tree view area of SAS ETL Studio.
b. Right-click on the icon for the Foundation metadata repository and select New Group from the
pop-up menu. The default name of the new group is Untitled.
c. Rename the new group to Source Tables (right-click on the group, select Rename, then type
in Source Tables).
d. Right-click on the icon for the Foundation metadata repository and select New Group from the
pop-up menu. The default name of the new group is Untitled.
e. Rename the new group to Target Tables (right-click on the group, select Rename, then type
in Target Tables).
f. Right-click on the icon for the Foundation metadata repository and select New Group from the
pop-up menu. The default name of the new group is Untitled.
g. Rename the new group to Jobs (right-click on the group, select Rename, then type in Jobs).
h. Right-click on the icon for the Foundation metadata repository and select New Group from the
pop-up menu. The default name of the new group is Untitled.
i. Rename the new group to Libraries (right-click on the group, select Rename, then type in
Libraries).
The resulting tree view:

5-92

Chapter 5 Using SAS ETL Studio

2. Add Library Definitions


Follow steps 817 outlined in the demonstration for loading the target table, starting on page 535.
a. Repeat demonstration steps 817 to define the following library and move it to the Libraries
group.
Library Name:

Source Tables Library

Libref:

Srcdata

Library Type:

SAS Base Engine Library

Path:

C:\Workshop\winsas\sbip\Orion_Star_15AUG03\ordetail

Server:

SASMain

3. Add Source Table Definitions


a. Select the Source Designer from the Shortcut bar of the SAS ETL Studio desktop.
b. Select SAS as the metadata import source type. Select
SAS Library window.

to access the Select a

c. Select Source Tables Library in the SAS Library field. Select


Define Tables window.
d. Select the ORDERS source table from the Select Tables list. Select
Select Group window.
e. Select the Source Tables group table from the list. Select
window.
f. Verify that the information is correct, then select
source table ORDERS is now defined.

to access the

to access the

to access the Wizard Finish

. The metadata definition for the

g. Repeat steps a f to define the metadata for the Order_Item source table from the Source Tables
Library.
h. Repeat steps a f to define the metadata for the Product_List source table from the Source Tables
Library.

5.4 Solutions to Exercises

5-93

4. Target Table Definitions


Follow steps 114 outlined in the demonstration for loading the target table, starting on page 552.
5. Add the ProductDim Target Table Definition
a. Select Target Designer from the Shortcut bar of the SAS ETL Studio desktop.
b. Select Target Table as the type of target to design. Select
c. Type ProductDim for the name of the target table. Select

.
.

d. Move the following column definitions to the Selected Columns list:


Table to Select From:

Columns to Select:

PRODUCT_LIST

Product_ID
Product_Name
Product_Ref_ID

Select

e. Review and verify the metadata that was imported for each of the columns.

5-94

Chapter 5 Using SAS ETL Studio

f. Select

to define the Product_Group column information.

1) Type Product_Group in the Name field.


2) Type Product Group in the Description field.
3) Advance to the Length field and set the length to 45.
4) Advance to the Type field and select Character.
g. Select

h. Select Target Tables Library for the Library field. Select


i. Verify that the information is correct, then select

.
.

j. Move the table ProductDim to the Target Tables group.


6. Defining a Job to Load the OrderFact Table
a. Follow steps 118 outlined in the demonstration for creating a job, beginning on page 554.
b. To define the derived mapping for Order_Qtr:
1) Right-click Order_Qtr and select Expression from the pop-up menu.
2) In the Expression Builder window, select the Date and Time category of functions to display
a listing of all date/time functions. Double-click the Qtr(date) function.
3) Select the Data Sources tab. Expand the ORDERS table and click Order_Date.
4) Select
5) Select
appear, select

. The Expression Text field updates to: QTR(ORDERS.Order_Date).


to return to the SQL Join Properties window. A warning message may
to close the message window and update the mappings.

c. To define the derived mapping for Order_Month:


1) Right-click Order_Month and select Expression from the pop-up menu.
2) In the Expression Builder window, select the Date and Time category of functions to display
a listing of all date/time functions. Double-click the Month(date) function.
3) Select the Data Sources tab. Expand the ORDERS table and click Order_Date.
4) Select

. The Expression Text field updates to: MONTH(ORDERS.Order_Date).

5) Select

to return to the SQL Join Properties window. A warning message may

appear; select

to close the message window and update the mappings.

5.4 Solutions to Exercises

5-95

d. To define the derived mapping for Delivery_Time:


1) Right-click Delivery_Time and select Expression from the pop-up menu.
2) In the Expression Builder window, select Data Sources.
3) Expand the ORDERS table and double-click Delivery_Date.
4) Select

to add a minus sign to the expression.

5) Double-click Order_Date. The Expression Text field updates to


Delivery_Date-Order_Date.
6) Select
appear, select

to return to the SQL Join Properties window. A warning message may


to close the message window and update the mappings.

to close the SQL Join Properties window and then File  Close to close the
e. Select
Process Designer window.
7. Define a Job to Load the ProductDim Table
a. Select the Process Designer from the Shortcut bar of the SAS ETL Studio desktop. This will
activate the New Job wizard.
b. Type Populate the ProductDim Table in the Name field. Select
c. Select the table ProductDim from the Select Tables list. Select

.
.

Be sure to select ProductDim and not Product_Dim.

d. Verify that the information is correct, then select

e. Select the Process Library tab in the tree view area of SAS ETL Studio.
f. Expand the Data Transforms folder and locate the process Extract.
g. Drag Extract to the area labeled Place table or transformation here in the Process Designer
window.
h. Select the Custom tab in the tree view area, expand the Source Tables group, and drag the table
Product_List over the area labeled Place table or transformation here in the Process Designer
window.

5-96

Chapter 5 Using SAS ETL Studio

i. Right-click on the Extract process and select Properties.


j. In the Properties window, select the Mapping tab.
k. On the Mapping tab, right-click in the area under the Target tables and select Import Columns.
l. Expand the repository Foundation ,the library Target Tables, the table ProductDim, and select
the column Product_Group.
Select

m. Right-click the Product_Group column and select Expressions.


n. Build the following expression: PUT(Product_Ref_ID,product.).

5.4 Solutions to Exercises

o. Select
select

p. Select

5-97

to return to the Extract Properties window. If a warning message appears,


to close the message window and update the mappings.

to close the Extract Properties window.

q. Select File  Close to close the Process Designer window and select
changes.

to save the

8. Loading Data into the OrderFact Target Table


Follow steps 111 outlined in the demonstration for loading the target table, starting on page 577.
9. Loading Data into the ProductDim Target Table
a. Open the Process Designer window for the Populate the ProductDim Table job by expanding
the Jobs group (on the Custom tab of the tree view). Right-click the job Populate the
ProductDim Table and select View Job.
b. Right-click on the Loader icon and select Properties.

5-98

Chapter 5 Using SAS ETL Studio

c. Select the Load Technique tab and specify a Load Technique of Refresh.
d. Activate the radio button Drop Table.

5.4 Solutions to Exercises

5-99

e. Select the Mapping tab. To map the new columns created earlier, right-click in the Target table
area and select Quick Map.
f. Select

to return to the Process Designer window.

g. To load the target table, submit the job by right-clicking in the background of the Process
Designer window, then select Submit from the pop-up menu.
h. Select

the job processes (a status window displays while processing is occurring).

i. Select the Log tab at the bottom of the Process Designer to view the log information from this job.
j. Close the Process Designer window by selecting File  Close and save the changes if prompted.
k. To view the data, right-click the ProductDim table in the Target Tables group (on the Custom tab
from the tree view). Select View Data from the pop-up menu.

l. Select File  Close to the View Data window.

5-100

Chapter 5 Using SAS ETL Studio

Chapter 6 SAS OLAP Cube Studio


6.1

Overview of SAS OLAP Cube Studio ..........................................................................6-3

6.2

SAS OLAP Cube Studio Interface..............................................................................6-17

6.3

SAS OLAP Cube Studio and Microsoft Excel ...........................................................6-44

6.4

Solutions to Exercises ...............................................................................................6-56

6-2

Chapter 6 SAS OLAP Cube Studio

6.1 Overview of SAS OLAP Cube Studio

6.1 Overview of SAS OLAP Cube Studio

What Is OLAP?
OLAP (Online Analytical Processing) is a software
technology that enables users to dynamically analyze
data that is stored in multidimensional database tables.
Because of the way the data and its relationships are
stored, they are readily available for detailed queries and
analysis.

What Is OLAP?
Central to the OLAP storage process are cubes.
A cube is a set of data that is organized and structured
in a hierarchical, multidimensional arrangement, often
with numerous dimensions and levels of data.

6-3

6-4

Chapter 6 SAS OLAP Cube Studio

What Is OLAP?
The classification information in the data is organized
into dimensions.
For example, a TIME dimension might have all input
columns related to time (date, month, year) grouped as
levels.
Dimension levels can then be organized into a hierarchy.
The hierarchy determines the logical order of the levels in
a dimension. The logical order makes it possible for users
to drill down into the cube data.

What Is OLAP?
Cubes also contain measures, which are based on
numeric analysis columns in the input tables.
These numeric values are summarized and stored in
the cube for quick access and analysis during a query.
Examples of measures include sales figures and
operational costs.

6.1 Overview of SAS OLAP Cube Studio

What Is SAS OLAP Cube Studio?


The SAS OLAP Cube Studio is a Java interface for
defining and building OLAP cubes in SAS9.
The Cube Designer wizard, which guides the user
through the process of creating and registering a cube,
is the main feature of SAS OLAP Cube Studio and is
also available in SAS ETL Studio.

What Is SAS OLAP Cube Studio?


Other tasks that can be performed using the SAS OLAP
Cube Studio include
 defining OLAP schemas in a SAS Metadata
Repository
 registering library definitions for the tables used to
build cubes
 registering the tables used to build cubes
 editing cube structure
 deleting cubes
 adding and deleting aggregations
 viewing cube properties.

Queries in SAS OLAP Cube Studio are performed using the industry standard MDX language
(multidimensional expression language), which is similar to SQL but can use cubes as input.
This provides improved performance over previous releases of SAS.

6-5

6-6

Chapter 6 SAS OLAP Cube Studio

Interaction with SAS Application Servers


SAS OLAP Cube Studio uses different types of
application servers:
SAS Metadata
Server

Required for purposes of creating and


managing metadata for both the cube
and the processes for building the
cube.

SAS Workspace Used to generate and submit SAS


Server
code, and to access information
about SAS resources (that is, source
tables) for the cube.

...

When the OLAP user requests a piece of metadata, the SAS Metadata Server handles
accessing metadata from the repository
providing the metadata to the SAS OLAP Cube Studio client
writing the metadata back out to the repository.

The SAS OLAP Server is only used for viewing cube data, not for building cubes. Neither
SAS OLAP Cube Studio nor SAS ETL Studio have an OLAP viewer for viewing cubes;
therefore, the SAS OLAP Server does not have to be running when using either of these
client tools.

6.1 Overview of SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


OLAP cubes usually contain an NWAY aggregation. The
NWAY aggregation can be thought of as a table that
contains the crossing of all dimension levels of the OLAP
cube.
Example: Examine the concept of the NWAY
aggregation by discussing a summary table
created from the SUMMARY procedure.

10

NWAY Aggregation Concept (Optional)


SalesData table:
SalesPerson
Jodi Lee
Jodi Lee
Jodi Lee
Jodi Lee
Jodi Lee
Jodi Lee
Todd Munch
Todd Munch
Todd Munch
Todd Munch
Todd Munch
Todd Munch

Month
1
1
2
2
3
3
1
1
2
2
3
3

Units
6
4
7
5
8
6
7
3
5
7
9
5

SalesAmount
300
200
350
250
400
300
350
150
250
350
450
250

11

The values shown above for SalesPerson are shortened on future slides for space
consideration reasons.

6-7

6-8

Chapter 6 SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


The SalesData table can be summarized using the
SUMMARY procedure, and the summary information
output to a new table called SalesSummary.
proc summary data=SalesData;
class SalesPerson Month;
var Units SalesAmount;
output out=SalesSummary sum=TotalUnits
TotalSales;
run;

12

The SUMMARY procedure provides data summarization tools that compute descriptive statistics for
variables across all observations or within groups of observations. By default PROC SUMMARY does
not display output. PROC SUMMARY is similar to the MEANS procedure.

NWAY Aggregation Concept (Optional)


A simple listing of the new summary table,
SalesSummary, can be created with a PROC PRINT
step.
proc print data=SalesSummary;
run;

13

6.1 Overview of SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


SalesSummary table:
Obs
1
2
3
4
5
6
7
8
9
10
11
12

Sales
Person Month _TYPE_ _FREQ_
0
12
.
1
4
1
1
4
2
1
4
3
JLee
2
6
.
TMunch
2
6
.
JLee
3
2
1
JLee
3
2
2
JLee
3
2
3
TMunch
3
2
1
TMunch
3
2
2
TMunch
3
2
3

Total
Units
72
20
24
28
36
36
10
12
14
10
12
14

Total
Sales
3600
1000
1200
1400
1800
1800
500
600
700
500
600
700

14

The output data set created by PROC SUMMARY contains two special variables:
_TYPE_

identifies the combination of class variables for which summarization is


done.

_FREQ_

indicates the number of observations included in that level of summary.

NWAY Aggregation Concept (Optional)


The _TYPE_ variable values display different types of
summarizations.
Review _TYPE_=0 (observation 1) in the
SalesSummary table.
Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
1

12

72

Total
Sales
3600

This observation displays summarizations for no particular


SalesPerson OR Month; therefore, this
summarization is overall summarizations for the entire
data set.
15

6-9

6-10

Chapter 6 SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


Review _TYPE_=1 (observations 2 - 4).
Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
2
3
4

1
2
3

1
1
1

4
4
4

Total
Sales

20
24
28

1000
1200
1400

These observations display summarizations for each


distinct Month across all SalesPerson values.

16

NWAY Aggregation Concept (Optional)


Review _TYPE_=2 (observations 5 - 6).
Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
5
6

JLee
TMunch

2
2

6
6

36
36

Total
Sales
1800
1800

These observations display summarizations for each


distinct SalesPerson across all Month values.

17

6.1 Overview of SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


Review _TYPE_=3 (observations 7 - 12).
Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
7
8
9
10
11
12

JLee
JLee
JLee
TMunch
TMunch
TMunch

1
2
3
1
2
3

3
3
3
3
3
3

2
2
2
2
2
2

Total
Sales

10
12
14
10
12
14

500
600
700
500
600
700

These observations display summarizations for each


distinct SalesPerson broken down by Month values.
18

NWAY Aggregation Concept (Optional)


For the _TYPE_=3 observations, notice that observations
7 through 9 can be summarized to obtain the values for
observation 5.
Similarly, observations 10 through 12 can be summarized
to obtain the values for observation 6.

19

6-11

6-12

Chapter 6 SAS OLAP Cube Studio

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
7
8
9
10
11
12

JLee
JLee
JLee
TMunch
TMunch
TMunch

1
2
3
1
2
3

3
3
3
3
3
3

2
2
2
2
2
2

10
12
14
10
12
14

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
5
6

JLee
TMunch

2
2

6
6

Total
Sales
500
600
700
500
600
700

Total
Sales

36 1800
36 1800
...

20

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
7
8
9
10
11
12

JLee
JLee
JLee
TMunch
TMunch
TMunch

1
2
3
1
2
3

3
3
3
3
3
3

2
2
2
2
2
2

10
12
14
10
12
14

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
5
6
21

JLee
TMunch

2
2

6
6

36
36

Total
Sales
500
600
700
500
600
700

Total
Sales
1800
1800
...

6.1 Overview of SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


In addition to the previous example, notice that the
_TYPE_=3 observations 7 and 10 can be summarized to
obtain the values for observation 2.
Similarly, observations 8 and 11 can be summarized to
obtain the values for observation 3, and observations 9
and 12 can be summarized to obtain the values for
observation 4.

23

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
7
8
9
10
11
12

24

JLee
JLee
JLee
TMunch
TMunch
TMunch

1
2
3
1
2
3

3
3
3
3
3
3

2
2
2
2
2
2

Total
Sales

10
12
14
10
12
14

500
600
700
500
600
700

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
2
1
1
4
20
3
2
1
4
24
4
3
1
4
28

Total
Sales
1000
1200
1400
...

6-13

6-14

Chapter 6 SAS OLAP Cube Studio

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
7
8
9
10
11
12

JLee
JLee
JLee
TMunch
TMunch
TMunch

1
2
3
1
2
3

3
3
3
3
3
3

2
2
2
2
2
2

10
12
14
10
12
14

Total
Sales
500
600
700
500
600
700

Sales
Total Total
Obs Person Month _TYPE_ _FREQ_ Units Sales
2
1
1
4
20 1000
3
2
1
4
24 1200
4
3
1
4
28 1400
...

25

Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
7
8
9
10
11
12

JLee
1
JLee
2
JLee
3
TMunch 1
TMunch 2
TMunch 3

3
3
3
3
3
3

2
2
2
2
2
2

10
12
14
10
12
14

Total
Sales
500
600
700
500
600
700

Sales
Total Total
Obs Person Month _TYPE_ _FREQ_ Units Sales
2
1
1
4
20 1000
3
2
1
4
24 1200
4
3
1
4
28 1400
26

...

6.1 Overview of SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


If the NWAY option is used in the PROC SUMMARY
statement ...
proc summary data=SalesData NWAY;
class SalesPerson Month;
var Units SalesAmount;
output out=SalesSummary sum=TotalUnits
TotalSales;
run;

continued...
28

NWAY Aggregation Concept (Optional)


... the generated output table contains only the values
where _TYPE_=3.
Sales
Total
Obs Person Month _TYPE_ _FREQ_ Units
1
2
3
4
5
6

29

JLee
JLee
JLee
TMunch
TMunch
TMunch

1
2
3
1
2
3

3
3
3
3
3
3

2
2
2
2
2
2

10
12
14
10
12
14

Total
Sales
500
600
700
500
600
700

6-15

6-16

Chapter 6 SAS OLAP Cube Studio

NWAY Aggregation Concept (Optional)


The NWAY aggregation in an OLAP cube is similar to the
output table that is generated from a PROC SUMMARY
step using the NWAY option.
All other aggregations in an OLAP cube can be generated
from the NWAY aggregation.

30

6.2 SAS OLAP Cube Studio Interface

6.2 SAS OLAP Cube Studio Interface

SAS OLAP Cube Studio: The Interface


When connected to a SAS Metadata Server, the main
window of the SAS OLAP Cube Studio displays cube
information specific to that metadata server.
All cube administration tasks, such as creating and
updating cubes, are initiated from this window.
The main window has six main visual components:
 the menu bar
 the toolbar
 the shortcut bar
 the navigation tree
 the status bar
 the messages window.
32

Tools, Menus, and Online Help


The toolbar and pull-down menus provide fast access to
a set of selected commands. The icons available on the
toolbar depend on which window is active from within the
interface.

Menus and
Tools

33

6-17

6-18

Chapter 6 SAS OLAP Cube Studio

The Shortcut Bar


The Shortcut bar is populated with icons for each task an
OLAP user would typically perform:

Shortcut Bar

...

34

The Shortcut Bar


The Shortcut bar is populated with icons for each task an
OLAP user would typically perform:

35

Options

Used to change the selected SAS


Application Server and to test the
connection to a logical SAS
Workspace Server.

Create OLAP
Schema

Used for creating new OLAP


schemas.

Source
Designer

Used to design new source tables in


a metadata repository.

Cube Designer

Used to define and build a new cube.


...

6.2 SAS OLAP Cube Studio Interface

Navigation Tree
The navigation tree displays an organized list of the
cubes, OLAP schemas, and tables registered in the
selected SAS Metadata Repository.

Navigation
Tree

36

Status Bar
The status bar is located at the bottom of the SAS OLAP
Cube Studio application window. It displays short status
messages for the application.

Status Bar

37

6-19

6-20

Chapter 6 SAS OLAP Cube Studio

Messages Window
The Messages window displays application messages
such as:
Application Server Error: Attempted
connection to Application Server failed.
Verify that the server is running.
To resize the Messages window, use your mouse to drag
the top edge of the window up or down. When you close
the window, your resized setting is saved.
To toggle the display of the Messages window, select
View  Message Window.
38

Messages Window

Messages
Window

39

CAUTION:

Other SAS OLAP Cube Studio elements, such as the Properties dialog box and the
SAS Log window, are displayed in the same area as the Messages window. For this
reason, when resizing the Messages window, make sure that you leave enough room
for SAS OLAP Cube Studio to display those other elements.

6.2 SAS OLAP Cube Studio Interface

Using the Cube Designer Wizard


The Cube Designer wizard is used to
 create and edit cube definitions that are stored in the
active metadata repository
 build cubes based on the stored definitions.

40

The same Cube Designer Wizard is also available from SAS ETL Studio.

6-21

6-22

Chapter 6 SAS OLAP Cube Studio

Using the Cube Designer Wizard


The General window is used to specify the cubes name
and description. You also select a storage location for the
cubes definition and a storage location for the physical
cube.

41

SAS OLAP Server names for cubes, dimensions, hierarchies, measures, and member properties follow

these general rules:

can be up to 32 characters in length


can contain embedded blanks
can contain mixed-case letters
do not contain periods (.).

These guidelines assume that the SAS Workspace Server is running with the
VALIDVARNAME= system option set to ANY.

If a hierarchy is balanced, then all of its branches descend to the same leaf (bottom) level. In addition,
each member has a parent level that is positioned immediately above it. However, hierarchies are not
always balanced and sometimes they contain missing hierarchy members. This type of hierarchy is a
ragged hierarchy. The Ragged Hierarchies tab enables you to set options to handle the missing members
(character and numeric) for all levels and hierarchies within the cube.

6.2 SAS OLAP Cube Studio Interface

Using the Cube Designer Wizard


On the Input window, you specify the data source that
provides the input data for your cube by selected an
already registered data source or by defining a new
data source.

42

Using the Cube Designer Wizard


The Drill-Through window is used to specify an optional
drill-through table. Drill-through tables can be used by
client applications to provide a view from processed data
into the underlying data source.

43

6-23

6-24

Chapter 6 SAS OLAP Cube Studio

Using the Cube Designer Wizard


From this wizard window you launch the Dimension
Designer wizard to define the cubes dimensions and
their associated hierarchies and levels.

...

44

You can have a maximum of 128 dimensions per cube.

Dimensions, Hierarchies, and Levels


Dimension a group of closely related hierarchies.

45

Hierarchy

an arrangement of members of a
dimension into levels that are based on
parentparent-child relationships. Each hierarchy
provides a navigational path that enables
users to drill down to increasing levels of
detail.

Level

an element of a dimension hierarchy.


Levels describe the dimension from the
highest (most summarized) level to the
lowest (most detailed) level.
...

For example, in a Time dimension, a hierarchy might consist of Year, Quarter, Month, and Day (which are
the levels).

6.2 SAS OLAP Cube Studio Interface

Using the Cube Designer Wizard


The Member Property window is where you can add,
modify, and delete member properties for the levels
in the cube.

46

The maximum number of member properties per level is 256.

Using the Cube Designer Wizard


In the Generated Aggregations window, you define
aggregations to be generated for the cube in addition
to whether the NWAY aggregation (the crossing of all
dimension levels) is automatically generated.

47

6-25

6-26

Chapter 6 SAS OLAP Cube Studio

Using the Cube Designer Wizard


The Finish window is where you review the details of
the cube that you just defined and choose whether to
only save the cubes definition to the active metadata
repository, or to save the cube's definition and build
the cube.

...

48

In this window you can also save the PROC OLAP code that is created by the wizard.

SAS OLAP Cube Studio Case Study Tasks


Goal: Build a cube in order to examine trends in length of
delivery over time and for different types of orders.
Time Dimension
Order_Year
Order_Qtr
Order_Month
OrderFact

Measures
Delivery_Time:




Average
Minimum
Maximum

OrionStar

Quantity:


Average

Total_Retail_Price:


49

Product Dimension
Order_Type
Product_ID

Sum

...

The OrionStar cube will be built from the OrderFact detail table and consists of two dimensions and
several measures.

6.2 SAS OLAP Cube Studio Interface

Building a Cube

This demonstration illustrates building a cube using SAS OLAP Cube Studio.

1. Invoke the SAS OLAP Cube Studio by selecting Start  All Programs  SAS 
SAS OLAP Cube Studio 9.1.
2. Select the metadata profile BIArchitecture, then select

6-27

6-28

Chapter 6 SAS OLAP Cube Studio

3. If prompted, enter the username and password provided by the instructor.

Select

The OLAP Cube Studio desktop opens:

6.2 SAS OLAP Cube Studio Interface

4. Select the Cube Designer from the Shortcut bar to access the Cube Designer wizard.

Select

to access the general window of the Cube Designer.

5. Specify general information for the cube to be created:


a. Enter OrionStar in the Cube Name field (use no spaces).
b. Provide a description, if desired (optional).
c. Select the Foundation repository in the Repository field.
d. Select SASMain OLAP Schema in the OLAP Schema field.

6-29

6-30

Chapter 6 SAS OLAP Cube Studio

e. Select
to navigate to C:\Workshop\winsas\sbiovr\DataMarts\Cubes in the
Path field (the folder Cubes must be created).

f.

The path to where the cube is to be created is not a libref but a physical file
location. Within the specified path, the cube is stored in a directory that uses the
name of the cube. For example, if you enter the path specification above, then the
cube will be stored in C:\Workshop\winsas\sbiovr\DataMarts\Cubes\OrionStar.

Select Detail Table as the input type in the Input field.

6.2 SAS OLAP Cube Studio Interface

6-31

g. Select
to get to the Advanced Cube Options window. The Ragged Hierarchies tab
enables you to set options to handle the missing members globally for all levels and hierarchies.
1) Select A blank space for the Character Missing Member option on the
Ragged Hierarchies tab.
2) Select A single period for the Numeric Missing Member option on the
Ragged Hierarchies tab.

Select

to close the Advanced Cube Options.

Select

to access the Cube Designer Input window.

6-32

Chapter 6 SAS OLAP Cube Studio

6. In the Select a Detail Table list, select Foundation to see the registered data sources, select
OrderFact as the input source.

Select

to access the Cube Designer Drill-Through window.

7. Activate the No table for Drill-Through radio button (this is the default).

Select

to access the Cube Designer Dimension Tables window.

6.2 SAS OLAP Cube Studio Interface

8. Select

to access the Dimension Designer General window.

a. Specify Time in the Name field.


b. Enter a Caption of Time Dimension.
c. Select a Type of TIME.

Select

You can have only one time dimension per cube.

to access the Dimension Designer Levels window.

6-33

6-34

Chapter 6 SAS OLAP Cube Studio

9. Select Order_Year, Order_Qtr, and Order_Month as the levels:

10. Select

Select

to review the Level Properties.

to access the Define a Hierarchy window.

6.2 SAS OLAP Cube Studio Interface

11. Select

6-35

to define a hierarchy.

12. Specify a Name of Time, a Caption of Time Hierarchy (Year, Quarter, Month) and
choose the 3 available levels of Order_Year, Order_Qtr, and Order_Month.

The ordering of the variables in this list is important.

Select

to close the Define a Hierarchy window.

Select

6-36

Chapter 6 SAS OLAP Cube Studio

13. Add a second dimension.


a. Select

to access the Dimension Designer General window.

b. Specify Product in the Name field.


c. Enter a Caption of Product Dimension.
d. Select a Type of STANDARD.

e. Select
f.

to access the Dimension Designer Levels window.

Select Order_Type and Product_ID as the levels.

6.2 SAS OLAP Cube Studio Interface

g. Select

to review the Level Properties.

h. Select

to access the Define a Hierarchy window.

i.

Select

to define a hierarchy.

j.

Specify a Name of Product, a Caption of Product Hierarchy (Order Type,


Product ID) and choose all the available levels (Order_Type and Product_ID).

k. Select

to close the Define a Hierarchy window.

l.

Select

m. Select

to access the Cube Designer Select Measures window.

6-37

6-38

Chapter 6 SAS OLAP Cube Studio

14. Select the statistic and measures to be the in the cube:


a. Expand Quantity from the Available list and move Average to the Selected list.
b. Expand Total_Retail_Price in the Available list and move Sum to the Selected list.
c. Expand Delivery_Time in the Available list and move Average, Minimum, and Maximum
to the Selected list.

Select

to access the Cube Designer Measure Details window.

6.2 SAS OLAP Cube Studio Interface

6-39

15. Specify properties for the selected measures:


a. Select Delivery_TimeAVG in the Default Measure field.
b. Scroll to right and change the format of both AVG statistics to be 8.2.
c. Change the format of the MAX and MIN statistics to be 8.1.

Select

to access the Cube Designer Member Property window.

16. In the Cube Designer Member Property window, member properties can be added, modified and
deleted for the levels in the cube.
Select

to access the Cube Designer Generated Aggregations window.

17. In the Cube Designer Generated Aggregations window, you define aggregations to be generated
for the cube in addition to any automatically generated aggregations.
Select

to access the Cube Designer Finish window.

6-40

Chapter 6 SAS OLAP Cube Studio

18. To complete the cube design, write the metadata to the repository and create the cube, verify the
information is correct, and select
.

A status window displays as the cube is being built.

6.2 SAS OLAP Cube Studio Interface

19. Check the Log Frame for messages and to verify that the cube was created successfully.

20. If the cube was created successfully, it will be listed in the Cube group:

21. Select File  Exit to close SAS OLAP Cube Studio.

6-41

6-42

Chapter 6 SAS OLAP Cube Studio

22. A SAS OLAP cube is stored as a set of files on the operating system the OrionStar cube is stored at
C:\Workshop\winsas\sbiovr\DataMarts\Cubes\OrionStar:

6.2 SAS OLAP Cube Studio Interface

6-43

Exercises

1. Saving the Metadata and Creating the Cube


Complete the steps outlined above to save the metadata for OrionStar OLAP Cube and create the cube
(if you did not follow-along with the demonstration).

6-44

Chapter 6 SAS OLAP Cube Studio

6.3 SAS OLAP Cube Studio and Microsoft Excel

Viewing Cube Data


In SAS9 there are several options for viewing cube data
including:
 SAS Enterprise Guide 3
 the SAS Information Delivery Portals Visual Data
Explorer portlet
 the SAS Web OLAP Viewer for Java
 Microsoft Excel Pivot Tables.
This section shows how to use Microsoft Excel to view
a SAS OLAP cube.

53

Chapter 8 shows how to view a SAS OLAP cube using SAS Enterprise Guide. Chapter 12 shows how to
view a SAS OLAP cube using the Information Delivery Portals Visual Data Explorer.

Setting Cube Permissions


While the metadata about the cube is available to
all users by default, the data in the cube itself is not.
Permissions must be added manually for the desired
group of users to be able to display the cube data.
These permissions are granted using SAS Management
Console.

54

6.3 SAS OLAP Cube Studio and Microsoft Excel

6-45

Setting Cube Permissions

1. Select Start  All Programs  SAS  SAS Management Console to invoke the SAS Management
Console. Login using the BIArchitecture metadata profile and the username and password provided
by the instructor.

2. Expand Authorization Manager in the Navigation Tree.


3. Expand Resource Management.
4. Expand By Location.
5. Expand SASMain.
6. Expand SASMain OLAP Schema.

6-46

Chapter 6 SAS OLAP Cube Studio

7. Right-click the OrionStar cube and select Properties from the pop-up menu.
8. Select the Authorization tab in the OrionStar Properties window.
9. Select the PUBLIC group, then click on the check box to grant this group Read permission.

10. Select

to close the OrionStar Properties window.

11. Select File  Exit to close the SAS Management Console.

6.3 SAS OLAP Cube Studio and Microsoft Excel

Importing the Cube into Microsoft Excel

1. Open an empty Excel spreadsheet by selecting Start  All Programs  Microsoft Office 
Microsoft Excel.
2. Select Data  PivotTable and PivotChart Report to access the PivotTable and PivotChart
Wizard.
3. Select External data source as the location of the data to analyze and PivotTable as the kind of
report to create.

Select

4. To retrieve information about the external data source, select


Choose Data Source window.

to access the

6-47

6-48

Chapter 6 SAS OLAP Cube Studio

5. Select the OLAP Cubes tab, then double-click <New Data Source> to access the
Create New Data Source window.

6. Specify OrionStar as the name of the data source and choose SAS OLAP Data Provider 9.1 as
the OLAP provider.


Select

The name of the data source can be anything you want to call it.
to access the Data Link Properties window.

6.3 SAS OLAP Cube Studio and Microsoft Excel

7. Fill in the following information:


Data Source:

OrionStar

User ID:

< provided by instructor >

Password:

< provided by instructor >

SAS Machine DNS Name:

< provided by instructor >

SAS Service Name/Port:

5451 (default)

SAS Protocol:

ProtocolBridge (default)


Select

The name of the data source here must match the name of a data source registered in the
metadata.
to return to the Create New Data Source window.

6-49

6-50

Chapter 6 SAS OLAP Cube Studio

8. In the Create New Data Source window, the third item should indicate a default connection. If not
already selected, select OrionStar as the cube for item 4.

Select

to return to the Choose Data Source window.

9. Select the OrionStar cube on the OLAP Cubes tab.

Select

to access the PivotTable and PivotChart Wizard.

6.3 SAS OLAP Cube Studio and Microsoft Excel

10. There should now be a message next to

Select

to proceed to the third step of the wizard.

11. Accept the defaults location.

Select

specifying Data fields have been retrieved.

6-51

6-52

Chapter 6 SAS OLAP Cube Studio

12. Reenter the password provided by the instructor.

The PivotTable Field list should now appear in front of your Microsoft Excel spreadsheet.

6.3 SAS OLAP Cube Studio and Microsoft Excel

13. To populate the PivotTable with data from the SAS OLAP cube source:
a. Drag and drop Product Hierarchy from the PivotTable Field list into the
Drop Row Fields Here area of the PivotTable.
b. Drag and drop Time Hierarchy from the PivotTable Field list into the
Drop Column Fields Here area of the PivotTable.
c. Drag and drop Average Quantity and Average Delivery_Time from the
PivotTable Field list into the Drop Data Items Here area of the PivotTable.

6-53

6-54

Chapter 6 SAS OLAP Cube Studio

14. Double-click on the cell that contains the value of 1998 (Year level). This will drill to the next level in
the Time Hierarchy, the quarters:

This action can also be performed by right-clicking 1998 and selecting


Group and Show Detail  Show Detail from the pop-up menu.

15. Select File  Exit to close Excel, do not save the changes.

6.3 SAS OLAP Cube Studio and Microsoft Excel

6-55

Exercises

2. Importing the Cube into MS Excel


Complete the steps outlined above to load the data from the OrionStar cube into a Microsoft Excel
pivot table.

6-56

Chapter 6 SAS OLAP Cube Studio

6.4 Solutions to Exercises


1. Saving the Metadata and Creating the Cube
Follow steps 122 outlined in the demonstration for building a cube, beginning on page 627.
2. Importing the Cube into MS Excel
Follow steps 111 outlined in the demonstration for setting cube permissions, beginning on page
645.
Follow steps 115 outlined in the demonstration for importing the cube into Microsoft Excel,
beginning on page 647.

Chapter 7 Working with


SAS Stored Processes
7.1

An Overview of Stored Processes...............................................................................7-3

7.2

Creating and Registering a Stored Process .............................................................7-17

7.3

Creating a Stored Process from a SAS ETL Studio Job (Self-Study).....................7-33

7.4

Solutions to Exercises ...............................................................................................7-40

7-2

Chapter 7 Working with SAS Stored Processes

7.1 An Overview of Stored Processes

7.1 An Overview of Stored Processes

What Is a SAS Stored Process?


A stored process
 is a SAS program that is hosted on a server and
described by metadata
 can be executed by many of the new clients in the
SAS9 Intelligence Platform
 is similar in concept to programs run by SAS/IntrNet,
but more versatile because of the underlying metadata
and security support.

7-3

7-4

Chapter 7 Working with SAS Stored Processes

What Is a SAS Stored Process?


The ability to store your SAS programs on the server
provides an effective method for change control
management.
The stored process concept becomes even more powerful
when you consider that these SAS programs can be
invoked from multiple client contexts.
Using stored processes also enhances security and
application integrity because the programs that access
your sensitive data are contained on the server instead of
being widely distributed with the client applications.

Instead of embedding the SAS code into client applications, you can centrally maintain and manage this
code from the server. This gives you the ability to change your SAS programs and at the same time ensure
that every client that invokes a stored process will always get the latest version available.

Stored Processes Uses


Stored processes can be used for
 Web reporting
 analytics
 delivering result packages to clients or the mid-tier
 publishing results to channels or repositories.

7.1 An Overview of Stored Processes

Stored Process Input


Stored processes can access
 SAS data sources
 external files.

Stored Process Output


A stored process can produce any kind of output that a
SAS program can produce:
 data sets
 external files
 catalogs
 e-mail
 ODS output
 result packages.

7-5

7-6

Chapter 7 Working with SAS Stored Processes

Stored Process Desktop Clients


Stored processes can be accessed/executed from several
different client environments:
 SAS Add-In for Microsoft Office
 SAS Enterprise Guide
 SAS Information Map Studio.

Existing or new SAS code can be converted to a stored process and that stored process registered in the
SAS Management Console.
Beginning with version 3, SAS Enterprise Guide is the preferred method for working with stored
processes because it provides the ability to create, register, and test stored processes from one interface.

Stored Process Web Clients


Stored processes can be accessed/executed from
different Web-based environments:
 Stored Process Web Application
 SAS Web Report Studio
 SAS Information Delivery Portal.

7.1 An Overview of Stored Processes

Stored Processes Metadata Structure


Metadata is used in stored processes to describe
 input parameters
 input data sources
 output options
 execution environment
 descriptive data
 security options.

10

Stored Process Server Types


Stored processes can be hosted by two types of servers:
 SAS Stored Process Servers
 SAS Workspace Servers.
The two servers are similar but have different capabilities.

11

7-7

7-8

Chapter 7 Working with SAS Stored Processes

Stored Process Server


The Stored Process Server
 is a multiuser server
 is a single process shared by many clients
 runs under a single shared user identity
 is dedicated to executing stored processes
 implements several features not available on
workspace servers including:
streaming output
sessions
multiple-value input parameters
support for stored process web services.

12

Because the stored process server runs under the SASSRV user ID, stored process code can access two
macro variables to identify the user:
Macro Variable

Description

_metaperson

specifies the person metadata name that is associated with the _METAUSER
login variable. The value of this variable can be UNKNOWN.

_metauser

specifies the login username that is used to connect to the metadata server.

Example: These macro variables can be used in the stored process code in a FOOTNOTE statement to
identify who executed the stored process:
footnote "This program was executed by &_METAPERSON - &_METAUSER";

Make sure to use double quotes around the string so that the macro variable values will be
resolved.

7.1 An Overview of Stored Processes

7-9

Workspace Server
The Workspace Server
 is a single user server
 provides a new process that is started for each client
 each server is started with the client identity, so there
are some security advantages.

13

If you want to use a stored process to provide data to an information map, it must be executed
on a workspace server, and that workspace server must be the same one that runs the information
map.

SAS/IntrNet and Stored Processes


Stored processes are generally backward compatible with
the SAS/IntrNet Application Dispatcher.
Most existing Application Dispatcher programs can be
registered as a stored process with little or no conversion.
This is possible because Application Dispatcher programs
and stored processes share many capabilities, including
 _WEBOUT for streaming output
 same ODS options
 macro variables for input parameters
 similar debugging options.

14

7-10

Chapter 7 Working with SAS Stored Processes

Stored Process Samples

This demonstration shows the metadata information stored for a sample stored process.
1. Start the SAS Management Console by selecting Start  All Programs  SAS 
SAS Management Console, select the BIArchitecture metadata profile and enter the username and
password provided by the instructor.

7.1 An Overview of Stored Processes

2. Expand Stored Process Manager in the Navigation Tree.


3. Expand the Samples group.
4. Select the Stored Processes group.
The sample stored processes are displayed in the Display Area.

The physical programs for the Stored Process Samples are stored in
C:\Program Files\SAS\SAS 9.1\inttech\sample.

7-11

7-12

Chapter 7 Working with SAS Stored Processes

5. Right-click on the Hello World sample and select Properties from the pop-up menu.
6. The General tab provides the name, description, and keywords for the stored process.

Keywords are useful when you search for a specific stored process in applications such as the
SAS ID Portal.

7.1 An Overview of Stored Processes

7. The Execution tab provides important information about which server the stored process will be
executed on, where the stored process source code is located, and input and output options.

7-13

7-14

Chapter 7 Working with SAS Stored Processes

Execution properties:
SAS Server

The SAS server where the stored process will execute.

Source Repository

The directory where the physical SAS program is stored. This is not the
metadata repository. It is an operating system location where the SAS
program resides.

Source file

The name of the .sas file that contains your Stored Process.

Output

The results of the stored process will be delivered. Choices include


streaming results

A stored process result type in which the content


generated by the stored process is delivered to the
client through an output stream. The output stream
is generally visible to the stored process as the
_WEBOUT fileref.

transient result
package

A container for content that was produced by a


SAS program execution or a third-party application
for immediate use, and that is not saved. After you
disconnect from the server, the transient result
package disappears.
A container for content that was produced by a
SAS program execution or a third-party
application, and that is written to a specific
location. Permanent result packages remain in
existence even after the stored process completes
execution and you disconnect from the server.

permanent result
package

None

For cases where there is no report (such as when


you are only creating a data set).

7.1 An Overview of Stored Processes

7-15

8. The Parameters tab is where parameters are defined for the stored process. Parameters used in stored
processes are similar to those used in SAS Application Dispatcher programs. You pass parameters to
the SAS program, which then uses them as macro variables that can change the behavior and output
of the program.

The Hello World sample has no parameters. It can run without any additional information
from the user.

7-16

Chapter 7 Working with SAS Stored Processes

9. The Authorization tab is used to determine who can view, use, and update the stored process.

10. Select

to close the Properties window.

11. Select File  Exit to exit the SAS Management Console.

7.2 Creating and Registering a Stored Process

7.2 Creating and Registering a Stored Process

Creating a Stored Process


Beginning with version 3, SAS Enterprise Guide is the
preferred method for working with stored processes
because it provides the ability to create, register, and test
stored processes from one interface.
SAS ETL Studio also provides a point-and-click interface
for creating and registering stored processes.

17

Stored processes must be .sas file (or PDS members on z/OS) in SAS9.

If you want to execute an SCL or SOURCE catalog entry, you must write a wrapper
.sas program that uses PROC DISPLAY or %include to execute the entry. The SCL list
of parameter values familiar to SAS/IntrNet SCL developers is not created automatically
when using PROC DISPLAY, so you must use GLOBAL macro variables to access input
parameters.

7-17

7-18

Chapter 7 Working with SAS Stored Processes

Creating a Stored Process


Stored processes can be created and registered
manually by
 writing the code in the SAS Windowing Environment
(SAS Display Manager), or a text editor
 creating the metadata describing the stored process
using the SAS Management Console.

18

Manually Creating a Stored Process


There are three basic steps for manually creating a stored
process:
Step 1 Start with an existing, tested SAS program.
Step 2 Add the stored process macros.
Step 3 Register the stored process.

19

7.2 Creating and Registering a Stored Process

7-19

Step 1: The SAS Program


Before creating a stored process, make sure that the
SAS program it is based on is tested thoroughly.
If the program accesses a SAS data library with a
hard-coded path, the MLE (Metadata Libname Engine)
can be used to specify the LIBNAME statement if the
library is registered in the metadata repository.
So
libname orgold "C:\OrionStar15AUG03\orgold";
would become:
libname orgold meta port=8561
protocol=bridge library="Orion Gold"
repname="Foundation";
...

20

When you assign a libref in your metadata, using the LIBNAME statement, there is an advanced
option that allows you to identify that the library is preassigned. If you select that option, you can
leave the LIBNAME statement out all together, as long as the stored process server has the
METAAUTOINIT option specified as an object spawner parameter. The default is set to
NOMETAAUTOINIT.

METAAUTOINIT

Specifies whether the IOM server should connect back to the SAS Metadata
Server during startup in order to obtain additional configuration information such
as object server parameters and preassigned libraries. When METAAUTOINIT is
specified, the server uses the provided META* options to connect to the SAS
Metadata Server. With NOMETAAUTOINIT, IOM server startup does not
connect back to the SAS Metadata Server.

7-20

Chapter 7 Working with SAS Stored Processes

Step 2: The Stored Process Macros


 Use the %GLOBAL statement to identify any macro
variables used in the original program. These macro
variables will be removed and used as stored process
input parameters.
 The program continues with a standard comment
(*ProcessBody;) that initiates input parameter
processing, if any exist.
 The %STPBEGIN and %STPEND macros provide
the environment needed for a SAS program to run
as a stored process.
 The %STPBEGIN macro initializes the Output Delivery
System (ODS) to generate output from the Stored
Process.
 The %STPEND macro terminates ODS processing and
completes delivery of the output to the client or other
destinations. The macros must be used as a matched pair.
21

Parameters are initialized differently for the stored process server and the workspace server. The stored
process server sets parameter values before the stored process begins to execute. This means the first line
of code in the stored process can access any input parameter macro variable. The workspace server does
not set input parameters into macro variables until it reaches a comment line in the stored process.
A stored process that does not contain the comment line will never receive input parameters when
executed on a workspace server.
It is recommended that you begin all stored processes (regardless of the server types) with %global
declarations for all of your input parameters, followed by the *ProcessBody; comment.

7.2 Creating and Registering a Stored Process

Step 3: Registering the Stored Process


The Stored Process Manager Plug-In in SAS
Management Console, is used to provide the metadata to
register the stored process.
Attributes include:
 name, description, and keywords
 location of the source code
 server where the stored process will run
 any input parameters
 output options.

22

7-21

7-22

Chapter 7 Working with SAS Stored Processes

Creating and Registering a Stored Process

This demonstration shows how to manually create and register a stored process using an existing
SAS program.

1. Start a SAS Display Manager session using Start  All Programs  SAS  BIArchitecture 
Start SAS.

This shortcut uses some of the same configuration files as your stored process server, so
it provides a similar environment for testing. A benefit of this is that the Orion formats are
already defined to this SAS session. If you invoke SAS outside of this environment, you
receive format errors when you run this code.

2. Copy the following program in to the Enhanced Editor and submit it.
%let num=20;
options obs=&num;
libname orgold
"C:\Workshop\winsas\sbip\Orion_Star_15AUG03\orgold";
title "Listing of Orion Gold Customer";
proc print data=orgold.customer_dim label;
var customer_name customer_id;
run;

The program above is stored in:


c:\Workshop\winsas\sbiovr\customerlist.sas.

3. Verify that there are no ERROR messages in the log and that the program produced the desired
output.

7.2 Creating and Registering a Stored Process

4. Update the program with the stored process macros and remove the %LET statement.
REMOVE
%let num=20;
%global num;
*ProcessBody;
%stpbegin;
options obs=&num;
libname orgold
"C:\Workshop\winsas\sbip\Orion_Star_15AUG03\orgold";
title "Listing of Orion Gold Customer";
proc print data=orgold.customer_dim label;
var customer_name customer_id;
run;
%stpend;
5. Select File  Save As and save the updated program to
C:\Workshop\winsas\sbiovr\StoredProcesses\customerlist.sas.

The directory, StoredProcesses, does not exist and must be created.

Register the New Stored Process Program


6. Start SAS Management Console by selecting Start  All Programs  SAS 
SAS Management Console. Choose the BI Architecture metadata profile
and username and password provided by the instructor.

7-23

7-24

Chapter 7 Working with SAS Stored Processes

7. Locate the Stored Process Manager and select New Folder from the pop-up menu.

The folder in the metadata repository is only a logical way to organize the stored process
metadata. The physical programs are stored in a folder on the file system.

8. Enter Training for the Name field and Stored Process programs for the SAS 9.1
training course for the Description.

Select

to create the new folder.

7.2 Creating and Registering a Stored Process

7-25

9. Right-click the new folder Training and select New Stored Process.
10. Specify Orion Customer List for the Name field. Specify an appropriate description and
keywords, if desired.

Select
11. Select

.
to change the SAS Server to SASMain Logical Stored Process Server.
Make sure you change the SAS server to a stored process server. Stored processes can run on
a workspace server, but this example needs the STP server because streaming results is the
goal.

7-26

Chapter 7 Working with SAS Stored Processes

12. Select
window.

13. Select

to add a new Source Repository. This opens the Manage Source Repositories

A Source Repository is not the same thing as a metadata repository. The Source Repository
is the physical location where SAS programs are stored. You first need to allocate a storage
location that your servers can access to hold your stored processes. This storage location,
or repository, is implemented as a file system directory with the stored processes instances
represented as files, by name, with a .sas extension if appropriate for the file system.
to open the Add Repository window.

7.2 Creating and Registering a Stored Process

7-27

14. Specify C:\Workshop\winsas\sbiovr\StoredProcesses for the Location field and A


directory for stored processes in the SAS 9.1 training class for the
Description field.

Select

to return to the Manage Source Repositories window.

Select

to return to the Manage Source Repositories window.

15. Select

to change the Source repository to C:\Workshop\winsas\sbiovr\StoredProcesses.

16. Type customerlist.sas for the Source file field.

7-28

Chapter 7 Working with SAS Stored Processes

17. Select

Select

to change the Output field to Streaming.

.
Double-check the settings of this window carefully. It is easy to make a mistake in
this window. If you misspell any of the names or choose the wrong options, your
stored process will not work, and the problem can be hard to debug later.

7.2 Creating and Registering a Stored Process

18. Select

7-29

to add a parameter to the stored process.

19. Set the following parameters:


a. Specify Number of Records for the Label field.
b. Specify num for the SAS variable name field.
c. Specify Number of records to print for the Description field.
d. Select Required to make this a required parameter.
e. Change the Type to Integer.
f.

Specify 20 for the Default value field.

Select

to save the properties.


The SAS variable name must match the name of the macro variable in the SAS program.

7-30

Chapter 7 Working with SAS Stored Processes

The new parameter for the number of records is displayed:

Select

20. The new stored process is now visible in the Training folder.

7.2 Creating and Registering a Stored Process

7-31

Exercises

Manually create and register a stored process using an existing SAS program.

1. Create a Stored Process Program


a. Convert the following program in to a valid stored process program:
/* options nofmterr; */
%let gender=M;
libname orgold
"C:\Workshop\winsas\sbip\Orion_Star_15AUG03\orgold";
title Employee Salaries for Gender=&gender;
proc print data=orgold.organization_dim;
var employee_name salary;
where employee_gender=&gender;
sum salary;
run;

The program above is stored in c:\Workshop\winsas\sbiovr\salarylisting.sas.


If you try to run this program and you did not start SAS from the special shortcut, you will
get an error because there is a permanent format associated with the Organization_Dim
table. Uncomment the options statement for testing (be sure to remove it before saving the
stored process program):

b. Save the program as salarylisting.sas in c:\Workshop\winsas\sbiovr\storedprocesses\.

7-32

Chapter 7 Working with SAS Stored Processes

2. Register the Stored Process


Register the program in the Training folder created during the demo.
Name the new stored process Orion Salary Listing.
Use the SASMain Logical Stored Process Server to execute the stored process.
Set the output type to Streaming.
Add a parameter for the gender macro variable and specify M as the default value.

7.3 Creating a Stored Process from a SAS ETL Studio Job (Self-Study)

7-33

7.3 Creating a Stored Process from a SAS ETL Studio Job


(Self-Study)

Stored Processes and SAS ETL Studio


A stored process can be created from a SAS ETL Studio
job using the
Stored
Process
Wizard.

26

...

Because most SAS ETL Studio jobs do not create ODS output, stored processes created from SAS ETL
Studio do not include the %STPBEGIN and %STPEND macros. If the SAS ETL Studio job does create
ODS output, the %STPBEGIN and %STPEND macros can be added manually to the program created by
the Stored Process Wizard.

7-34

Chapter 7 Working with SAS Stored Processes

Stored Processes and SAS ETL Studio


The Stored Process wizard saves the job in the file
system using the specified name and source repository.
Metadata is also written to the metadata repository
describing the stored process.
The stored process can be deleted or modified with
SAS ETL Studio by
 right-clicking on the SAS ETL Studio job selection
 selecting Stored Process
 selecting the stored process name
 selecting Properties to modify the metadata
 selecting Delete to remove the metadata.

27

In order to run this stored process, the user must have authority on the operating system and the
metadata to update the OrderFact table. If the stored process is running on a Stored Process
server, the user ID is sassrv. If the stored process runs on a Workspace Server, it runs under the
ID of the client.

7.3 Creating a Stored Process from a SAS ETL Studio Job (Self-Study)

7-35

Creating a Stored Process from a SAS ETL Studio Job

This demonstration shows how to create a stored process from an existing ETL Studio job.
1. Start SAS ETL Studio by selecting Start  All Programs  SAS  SAS ETL Studio, select the
BIArchitecture metadata profile and enter the username and password provided by the instructor.

2. Expand Foundation in the Custom Navigation Tree.


3. Expand the Jobs group.

7-36

Chapter 7 Working with SAS Stored Processes

4. Right-click on Populate the ProductDim table and select Stored Process  New.
The New Stored Process Wizard opens.

to add a new folder.

5. Select

6. Name the new folder ETL Stored Processes.

7. Select

7.3 Creating a Stored Process from a SAS ETL Studio Job (Self-Study)

8. Select the ETL Stored Processes folder and select

7-37

9. Type Load the ProductDim Table as the name of the new stored process and enter a
description and keywords (if desired).

Select

10. Select SASMain Logical Workspace Server as the SAS Server.


and create a new location for the Source Repository by selecting
11. Select
and entering C:\Workshop\winsas\sbiovr\ETLJobs as the Location.


Select

The directory C:\Workshop\winsas\sbiovr\ETLJobs must exist or be created on the operating


system before completing the New Stored Process Wizard.
.

12. Select C:\Workshop\winsas\sbiovr\ETLJobs as the Source Repository.

7-38

Chapter 7 Working with SAS Stored Processes

13. Type the load_productdim.sas as the Source file name.

This .sas file will be created in the specified location by the New Stored Process Wizard.

14. Select None as the Output type (default).

Select

15. Because there are no parameters for this stored process, select

7.3 Creating a Stored Process from a SAS ETL Studio Job (Self-Study)

7-39

16. To edit the stored process, right-click on the job, select Stored Processes  stored process name 
Properties.
17. To delete the stored process, right-click on the job, select Stored Processes 
stored process name  Delete.

7-40

Chapter 7 Working with SAS Stored Processes

7.4 Solutions to Exercises


1. Create a Stored Process Program
a. Update the program with the Stored Process macros and remove the %LET statement.
%let gender=M;
REMOVE
%global gender;
*ProcessBody;
%stpbegin;
libname orgold
"C:\Workshop\winsas\sbip\Orion_Star_15AUG03\orgold";
title Employee Salaries for Gender=&gender;
proc print data=orgold.organization_dim;
var employee_name salary;
where employee_gender="&gender";
sum salary;
run;
%stpend;
b. Select File  Save As and save the updated program to:
C:\Workshop\winsas\sbiovr\StoredProcesses\salarylisting.sas.
2. Register the Stored Process
a. Start SAS Management Console by selecting Start  All Programs  SAS 
SAS Management Console. Choose the BI Architecture metadata profile and enter the
username and password provided by the instructor.
b. Expand the Stored Process Manager, right-click the folder Training, and select
New Stored Process.
c. Specify Orion Salary List for the Name field.
d. Specify an appropriate description and keywords, if desired.
e. Select
f. Select

.
to change the SAS Server to SASMain Logical Stored Process Server.

to change the Source repository to


g. Select
C:\Workshop\winsas\sbiovr\StoredProcesses.
h. Specify salarylisting.sas for the Source file field.
i. Select
j. Select
k. Select

to change the Output field to Streaming.


.
to add a parameter to the stored process.

7.4 Solutions to Exercises

l. Set the following parameters:


Label:

Gender Type

SAS variable name:

Gender

Description:

Gender Type

Boolean properties:

Required

Default value:

The default value must be an uppercase value to match the data.

m. Select
n. Select

to save the properties.


.

7-41

7-42

Chapter 7 Working with SAS Stored Processes

Chapter 8 SAS Enterprise Guide 3


8.1

New Features of SAS Enterprise Guide 3 ...................................................................8-3

8.2

Exploring SAS Enterprise Guide .................................................................................8-9

8.3

Using the Stored Process Manager...........................................................................8-24

8.4

Working with OLAP Cubes in SAS Enterprise Guide...............................................8-42

8-2

Chapter 8 SAS Enterprise Guide 3

8.1 New Features of SAS Enterprise Guide 3

8.1 New Features of SAS Enterprise Guide 3

SAS Enterprise Guide 3 System


Requirements
The following are the system requirements for installing
and using SAS Enterprise Guide 3:
 Internet Explorer 5.5
 Minimum Operating System
Windows NT 4.0 with SP6a
Windows 2000 Professional with SP1
Windows XP Professional

SAS Enterprise Guide 3 is not supported on Windows 98 or Windows ME.

SAS Enterprise Guide 3


Some key features of SAS Enterprise Guide 3 include:
 written in C#/.NET
 usability studies result in redesigned user interface
 ability to build project with the Process Flow Builder
 Stored Process authoring.

8-3

8-4

Chapter 8 SAS Enterprise Guide 3

SAS Enterprise Guide 3


Additional key features:
 integration with SAS metadata
 more code export options (option to save code/entire
process flow with ODS statements for easy use with
SAS/IntrNet)
 more control over ODS output format and destinations
 improvements to the OLAP Analyzer user interface
including an MDX editor
 more analytic procedures/tasks are included
 tasks have been rewritten so that they can be used in
other products.

MDX - Multidimensional Expression language.


Cubes can no longer be built in SAS Enterprise Guide.
Most of the tasks within SAS Enterprise Guide are also available for use in the SAS Add-In for
MS Office.

Interaction with SAS Application Servers


SAS Enterprise Guide 3 can use different types of
application servers:
SAS Metadata
Required to read and write metadata
Server
in a SAS metadata repository.
SAS Workspace Required to execute SAS code and
Server
access data.

SAS OLAP
Server

Required to process queries against


cubes.

SAS Stored
Process Server

Required to execute stored


processes and collect resulting
output.
...

8.1 New Features of SAS Enterprise Guide 3

Establishing the Metadata Server

In order to use SAS Enterprise Guide with the SAS Metadata Repository, you need to first identify the
metadata server in the SAS Enterprise Guide Administrator.
1. Select Start  All Programs  SAS  Enterprise Guide Administrator.

By default, the SAS Enterprise Guide Administrator will display the Local server.

2. Select File  Manage Repositories to open the Repository Manager application.

If the Configuration Wizard was used to configure the SAS Installation, a SAS Metadata
Repository already defined with the name ITConfig Metadata Repository should be listed.

8-5

8-6

Chapter 8 SAS Enterprise Guide 3

3. Select the ITConfig Metadata Repository, then choose

4. Enter the user ID and password provided by the instructor.

8.1 New Features of SAS Enterprise Guide 3

5. To ensure that the correct metadata repository has been selected, select
next to the
SAS Metadata Repository ID field to open the Select Repository window.
6. In the Select Repository window, select Foundation.

Select
7. Select

.
to close the Modify Repository window.

8. To make this repository the active repository, select it and choose

8-7

8-8

Chapter 8 SAS Enterprise Guide 3

Setup SAS Enterprise Guide so that it uses the SAS Metadata Repository for servers and channels.
9. Select the Usage tab in the Repository Manager.
10. Select Use the active SAS Metadata repository in the Servers, Libraries, and Binders section.
11. Select Use the active SAS Metadata repository in the Channels section.

Select

to close the Repository Manager window.

12. Select File  Exit to close the Enterprise Guide Administrator.

8.2 Exploring SAS Enterprise Guide

8.2 Exploring SAS Enterprise Guide

SAS Enterprise Guide 3: The Interface


A new Welcome Window allows users to do many things,
including:
 open an existing
project
 create a new
project
 create a new
SAS program
 view the SAS
Enterprise Guide
tutorial.

SAS Enterprise Guide 3: The Interface


The SAS Enterprise Guide interface has
 updated menus and toolbars
 a reorganized task list
 a new process flow window.

10

...

8-9

8-10

Chapter 8 SAS Enterprise Guide 3

Using the Workspace


The SAS Enterprise Guide workspace can have up to eight
separate windows, which can be docked or undocked.
Project

displays the active project and its


associated data, code, notes, and
results windows.

Process Flow

displays the process flow window.

Task List

displays a list of all of the available


tasks, either sorted by category or
alphabetically.

Server List

displays a list of all the available


SAS servers.
continued...

11

Using the Workspace

Binder List

displays a list of binders, or virtual


folders, that can be mapped to folders
or directories on a server or to folders
in your Windows native file system.

Stored Process displays a list of all of your stored


List
processes by repository.

12

Task Status

displays the status, queue position,


and server of any task that is currently
running.

What is

displays help for the selected option.

8.2 Exploring SAS Enterprise Guide

Using the Workspace


The View toolbar has toggle icons for each of these
SAS Enterprise Guide windows and several other
settings for working with the interface.
Maximize
Workspace

Project
Process
Flow
Task List

Task Status
What is?

Stored
Process List
Binder List

Style
Manager

Server List
...

13

The Maximize Workspace button changes the size of the active window to fill the entire
SAS Enterprise Guide workspace.

Minimizing Workspace Windows


Each window has a push-pin icon that helps manage your
workspace.
When you select
, the windows will fold up and retreat
into the edges of the workspace.
To expand a hidden window, move your mouse over the
window name. The window is displayed until you move your
mouse out of the window.
To unhide a window that you have hidden, select

14

8-11

8-12

Chapter 8 SAS Enterprise Guide 3

Exploring SAS Enterprise Guide 3

This demonstration explores interface and functionality of SAS Enterprise Guide.

1. Select Start  All Programs  SAS  Enterprise Guide 3.0 to invoke SAS Enterprise Guide.
2. Select New Project in the Welcome window.

8.2 Exploring SAS Enterprise Guide

8-13

3. Because this is the first time SAS Enterprise Guide has been run on this computer, there is no current
default server. Select
in the message box to open the Options window so that you can
change the default server.

a. Select Administration from the list in the left side of the Options window.

The Options window allows many other options to be set.

b. Make sure ITConfig Metadata Repository is the active repository.


c. Select SASMain as the default server.

Select

to save the changes and close the Options window.

8-14

Chapter 8 SAS Enterprise Guide 3

Run a Stored Process


4. Select View  Stored Process List to access the Stored Process window.
a. Expand Training.
b. Locate Orion Customer List.

c. Right-click on the stored process and select Add to Project.


5. In the Process Flow window, right-click on the stored process and select Run this Stored Process.

6. Because this stored process has a parameter, a window prompts you for the value.

Select

8.2 Exploring SAS Enterprise Guide

8-15

A HTML output item is added to the Process Flow window and the HTML report is displayed.

To view the log, right-click on the stored process and select Open Log.

When done viewing the report, close the HTML window and Log window if opened (select

).

8-16

Chapter 8 SAS Enterprise Guide 3

Add Data to the Active Project


7. To add data to the project from the Orion Star data libraries, select File  Open 
From SAS Server/Binder.
8. Select Servers  SASMain.

If prompted for credentials, enter the user ID and password provided by the instructor, and deselect
Remember these credentials.

Select

8.2 Exploring SAS Enterprise Guide

8-17

9. Double-click Libraries to view the libraries assigned to this server.


10. Double-click Target Tables Library.
11. Select OrderFact.

Select

12. The table is added to the Project and opened, however no data is displayed in SAS Enterprise Guide.

Close the table by selecting

8-18

Chapter 8 SAS Enterprise Guide 3

Set Permissions to View the Data in the OrderFact Table


13. Select Start  All Programs  SAS  SAS Management Console to invoke the SAS Management
Console. Log in using the BIArchitecture metadata profile and the username and password provided
by the instructor.

8.2 Exploring SAS Enterprise Guide

8-19

14. Expand the Data Library Manager and SAS Libraries.


15. Right-click on Target Tables Library and select Properties.
16. Select the Authorization tab.
17. Grant the Read permission to the PUBLIC group by selecting the appropriate check box.

18. Select

Setting permissions on the library will apply that permission to all tables that are currently in
the library as well as those that may be added in the future. Permissions can also be granted
on individual tables within a library.
.

19. Close the SAS Management Console by selecting File  Exit.

8-20

Chapter 8 SAS Enterprise Guide 3

20. Return to SAS Enterprise Guide and re-open the OrderFact table by double-clicking the icon in the
Process flow window data should now be displayed.

8.2 Exploring SAS Enterprise Guide

8-21

Run One-Way Frequencies Task on the OrderFact Table


21. Make sure the OrderFact table is the active data source (selected), then select One-Way Frequencies
from the Describe section of the Task List window.
22. When the task dialog opens, assign Order_Type to the Analysis variables role using drag and drop.

23. Use drag and drop to assign Order_Year to the Group analysis by role.

8-22

Chapter 8 SAS Enterprise Guide 3

24. Select Statistics in the navigation list on the left to change the statistics in the report. Select
Frequencies and percentages from the Frequency table options.

25. Select

8.2 Exploring SAS Enterprise Guide

The results return to the SAS Enterprise Guide application as an HTML page.

26. When done viewing, close the HTML page (select

).

8-23

8-24

Chapter 8 SAS Enterprise Guide 3

8.3 Using the Stored Process Manager

Stored Process Manager


SAS Enterprise Guide provides a wizard named the
Stored Process Manager that guides the user
through the steps of creating a stored process.
The wizard automatically
 adds the %STPBEGIN and %STPEND statements
 saves the code in the stored process code repository
 registers the stored process in the metadata
repository.

17

Stored Process Manager


SAS Enterprise Guide is the preferred way to develop and
test stored processes in SAS9 because you can create
and test the program in one application.
Stored processes can be created from a variety of
sources, including
 tasks that have been added to the project
 existing SAS programs.

18

8.3 Using the Stored Process Manager

Stored Process Manager


SAS Enterprise
Guide uses the
Create New
Stored Process
Wizard

19

...

8-25

8-26

Chapter 8 SAS Enterprise Guide 3

Using the Stored Process Manager

This demonstration shows how to create, register and run stored processes using SAS Enterprise Guide.

1. Right-click on One-Way Frequencies task in the Process Flow window and select Create Stored
Process.
2. In Step 1 of the wizard, accept the default name and enter a description and keywords (if desired).

Select

8.3 Using the Stored Process Manager

3. In Step 2, select
process metadata item.

to select the repository on the metadata server to store the stored

4. Expand the Foundation repository, and select the Training group:

Select

Select

8-27

8-28

Chapter 8 SAS Enterprise Guide 3

5. In Step 3, set the Execution server to SASMain Logical Stored Process Server SAS Stored
Process Server - 9.1.
6. Select the Source file path of C:\Workshop\winsas\sbiovr\StoredProcesses.
7. Accept the default source filename (this is the file that is being created for you by the SAS Enterprise
Guide Stored Process Wizard).

Select

8.3 Using the Stored Process Manager

8-29

8. Accept the defaults in Step 4.


Select

This window shows the LIBNAME statement that will be added to the new program in order
to access the source table. By default, these are set up using the Metadata Libname Engine.
.

8-30

Chapter 8 SAS Enterprise Guide 3

9. Accept the defaults in Step 5 since this stored process has no parameters.


Select

If parameters were needed to run this stored process, they would be added in this step.
.

10. Step 6 allows you to choose how the output will be packaged. Select Streaming output, since the
results of this stored process will be streamed back to the application that is was called from.

Select

8.3 Using the Stored Process Manager

11. In Step 7, verify that the information is correct:

Select

12. A message window displays indicating the stored process was successfully saved:

Select

8-31

8-32

Chapter 8 SAS Enterprise Guide 3

13. The stored process is now part of the project:

14. Open the Stored Process List window to see this new stored process by selecting View 
Stored Process List.

8.3 Using the Stored Process Manager

8-33

Create a Stored Process from an Existing Program


The Stored Process Manager in SAS Enterprise Guide can be used to create a stored processes from
existing SAS code. The wizard will scan the code for macro variables and lead you through a process of
creating parameters from them. This greatly simplifies the process of creating stored processes from
legacy code. To begin, add the existing program to the project.
15. Select File  Open  From My Computer.
16. Navigate to C:\Workshop\winsas\sbiovr and select customerlist.sas:
Select

. The code is displayed and added to the project.

17. Remove %let num=20; from the code.

8-34

Chapter 8 SAS Enterprise Guide 3

18. Right-click on this new code node and select Create Stored Process. The Stored Process Wizard
opens.
19. In Step 1, accept the default Name and specify a Description of Generated by Enterprise
Guide.

Select

20. In Step 2, verify that the location is //Foundation/Training and select

8.3 Using the Stored Process Manager

8-35

21. In Step 3, verify that the execution server is SASMain Logical Stored Process Server SAS
Stored Process Server 9.1, the source file path is C:\Workshop\winsas\sbiovr\StoredProcesses,
accept the default source filename and select

8-36

Chapter 8 SAS Enterprise Guide 3

22. In step 4, the wizard can help build parameters based on macro variables in the code.
a. Select

then Parameters from SAS Code.

b. Change the text of User prompt to Number of Records.


c. Select Integer as the Data type.
d. Enter a Default Value of 10.
e. Select the Required Option.

8.3 Using the Stored Process Manager

f.

Select the Constraints tab to limit the possible choices for this parameter.
1) Select Integer range as the type of constraint.
2) Click the boxes to provide values for the Minimum, Maximum, and Increment options.
3) Set the value of Minimum to 1.
4) Set the value of Maximum to 10000.
5) Set the value of Increment to 5.

Select

g. This parameter is saved and a message window opens, notifying you that no additional macro
variables have been located in the code:

Select

8-37

8-38

Chapter 8 SAS Enterprise Guide 3

The information about the num parameter is displayed:

Select

23. For Step 5, verify that Streaming output is selected, then choose

8.3 Using the Stored Process Manager

24. For Step 6, review the settings and select

25. A confirmation window appears:

Select

8-39

8-40

Chapter 8 SAS Enterprise Guide 3

26. A message may appear:

Select

to update the code task.

27. The new stored process has been added to the project and the Stored Process List window.

28. In the Process Flow window, right-click on the new stored process and select Run this Stored
Process.

8.3 Using the Stored Process Manager

29. A dialog window opens requesting a value for the parameter num. Enter 8 then select

30. The HTML report appears:

8-41

8-42

Chapter 8 SAS Enterprise Guide 3

8.4 Working with OLAP Cubes in SAS Enterprise Guide

SAS Enterprise Guide and OLAP


OLAP cubes can be viewed in SAS Enterprise Guide with
a new and improved OLAP Analyzer.

22

The OLAP viewer in SAS Enterprise Guide supports OLAP cubes from SAS9 and MDDBs
from SAS 8.2.

SAS Enterprise Guide and OLAP


Neither OLAP Cubes or MDDBs can be created in SAS
Enterprise Guide 3.
Cubes can be built using SAS OLAP Cube Studio or SAS
ETL Studio.

23

8.4 Working with OLAP Cubes in SAS Enterprise Guide

Using the SAS Enterprise Guide OLAP Viewer

This demonstration shows how to use SAS Enterprise Guide to view OLAP data.

1. Select File  Open  OLAP Cube.


2. Enter the machine name provided by your instructor as the OLAP Server Name.
3. Select SAS OLAP Data Provider 9.1 as the Provider.

Select

8-43

8-44

Chapter 8 SAS Enterprise Guide 3

a. Enter the user ID and password provided by your instructor.

Select

8.4 Working with OLAP Cubes in SAS Enterprise Guide

8-45

4. The Open OLAP Cube window will display the available cubes in your repository. Select OrionStar
(click the check box), then select
.

8-46

Chapter 8 SAS Enterprise Guide 3

5. The OLAP Analyzer will display the cube and allow you to navigate through the dimensions.

To work with the OLAP Analyzer more easily, maximize that window by selecting
View  Maximize Workspace, and turn off the Cube View Manager window by selecting
.

6. Expand both dimensions by selecting

next to All Time and All Product.

8.4 Working with OLAP Cubes in SAS Enterprise Guide

7. Change the chart to a pie chart by right-clicking on the chart and selecting Chart Type  Pie.
8. Change the view of the pie chart by right-clicking on the chart and selecting Put Groups On 
Stack.

9. Close SAS Enterprise Guide by selecting File  Exit (do not save the changes).

8-47

8-48

Chapter 8 SAS Enterprise Guide 3

Chapter 9 Using SAS Add-In for


Microsoft Office
9.1

Overview of the SAS Add-In for Microsoft Office .......................................................9-3

9.2

Using the SAS Add-In for Microsoft Office .................................................................9-6

9.3

Solutions to Exercises ...............................................................................................9-43

9-2

Chapter 9 Using SAS Add-In for Microsoft Office

9.1 Overview of the SAS Add-In for Microsoft Office

9.1 Overview of the SAS Add-In for Microsoft Office

SAS Add-In for Microsoft Office


The SAS Add-In for Microsoft Office is a Component Object
Model (COM) add-in that extends Microsoft Office by
enabling the user to harness the power of SAS analytics
and access SAS data sources from within Microsoft Word
and Microsoft Excel.

SAS Add-In for Microsoft Office


You can use the SAS add-in to execute stored processes
dynamically and embed the results in your documents
and spreadsheets.
Within Excel, you can use the SAS add-in to
 access and view SAS data sources
 access and view any other data source that is
available from your SAS server
 analyze SAS or Excel data using analytic tasks.

9-3

9-4

Chapter 9 Using SAS Add-In for Microsoft Office

Why Is the SAS Add-In for Microsoft Office


Important?
There are many business users who can benefit from
the power of SAS analytics, but they are not comfortable
working in a traditional programming environment.
The SAS Add-In brings SAS analytics, data access,
and SAS content to the Microsoft Office environment.

These business users are already familiar with Excel and Word and use the products daily. The ability to
run SAS programs within these programs provides tremendous flexibility and functionality.

Capabilities
With the SAS Add-In for Microsoft Office, you can
 embed SAS reports and analytics into Microsoft Office
applications using stored processes
 exchange data between SAS servers and Microsoft
Office
 manipulate results and distribute them with existing
Microsoft Office functionality.

9.1 Overview of the SAS Add-In for Microsoft Office

Requirements
The following are the system requirements for installing
and using the SAS Add-in for Microsoft Office:
 Windows NT 4, Windows 2000, Windows XP
 Office 2000 or greater
 SAS Add-In for Microsoft Office.

Interaction with SAS Application Servers


The SAS Add-In for Microsoft Office can use different
types of application servers:

SAS Metadata
Server

Required to read and write


metadata in a SAS metadata
repository.

SAS Workspace
Server

Required to execute SAS code and


access data.

Stored Process
Server

Required to execute stored


processes.

...

The SAS Add-In for Microsoft Office does not interact with the SAS OLAP Server. Microsoft
Excel can access SAS OLAP cubes using the pivot table functionality built into Excel.

9-5

9-6

Chapter 9 Using SAS Add-In for Microsoft Office

9.2 Using the SAS Add-In for Microsoft Office

Using the SAS Add-In for Microsoft Office


The SAS Add-in for Microsoft Office adds a
 SAS menu to the menu bar
 SAS Analysis toolbar
 SAS Data Analysis toolbar (Excel only).
SAS Menu

SAS Analysis
Toolbar

SAS Data Analysis


Toolbar
...

10

SAS Menu for Microsoft Excel


The SAS menu in Microsoft Excel provides access to the
functionality of the SAS Add-In for Microsoft Office,
including the following:
 ability to run stored processes
or SAS task
 tools to work with a
SAS data source
 options for the SAS Add-In
 ability to specify the server
 the style manager to customize
the appearance of results
returned to Microsoft Excel.

14

9.2 Using the SAS Add-In for Microsoft Office

SAS Menu for Microsoft Word


The SAS menu in Microsoft Word provides access to the
functionality of the SAS Add-In for Microsoft Office,
including the following:
 ability to run stored processes
or SAS task
 options for the SAS Add-In
 ability to specify the server
 the style manager to customize
the appearance of results
returned to Microsoft Word.

15

SAS Add-In Options Excel


The SAS Add-In for Microsoft Office options for Excel are
specified by selecting SAS  Options.

16

...

9-7

9-8

Chapter 9 Using SAS Add-In for Microsoft Office

SAS Add-In Options Word


The SAS Add-In for Microsoft Office options for Word are
specified by selecting SAS  Options.

...

17

SAS Analysis Tools Toolbar


The SAS Analysis Tools toolbar provides access to some
of the same options as the SAS menu.
Some of the tasks that can be performed include the
following:
 changing the active data source
 showing labels in the first row
 refreshing the results
 viewing the data
 browsing SAS programs
 exporting results to MS Word
 accessing your SAS Favorites.
18

9.2 Using the SAS Add-In for Microsoft Office

SAS Data Analysis Toolbar


The SAS Data Analysis toolbar provides access to
options for working with SAS data.
The tasks that can be performed include the following:
 opening a SAS data source
 navigating through the data
 using a filter
 sorting the data.


19

The SAS Data Analysis toolbar is not available in


Microsoft Word.

...

9-9

9-10

Chapter 9 Using SAS Add-In for Microsoft Office

Filtering SAS Data in Microsoft Excel


The SAS Add-In for Microsoft Office can filter SAS data
before bringing it into Excel.

20

Selecting
expressions.

opens an Expression Editor window for creating more advanced

9.2 Using the SAS Add-In for Microsoft Office

Sorting SAS Data in Microsoft Excel


The SAS Add-In for Microsoft Office can also sort
SAS data before bringing it into Excel.

21

Restricting SAS Columns in Microsoft Excel


The SAS Add-In for Microsoft Office provides a
mechanism to select which columns are displayed.

22

9-11

9-12

Chapter 9 Using SAS Add-In for Microsoft Office

Built-In SAS Tasks


The SAS Add-In for Microsoft Office provides access to
most of the same tasks found in SAS Enterprise Guide.
These tasks are broken down into the following categories:
 ANOVA
 Graph
 Basic Analysis
 Multivariate
 Capability
 Pareto
 Control Charts
 Regression
 Data
 Survival Analysis
 Describe
 Time Series

23

9.2 Using the SAS Add-In for Microsoft Office

9-13

Using the SAS Add-In for Microsoft Office

For this demonstration, you will


set the SAS Add-In for Microsoft Office options
run stored processes
access a SAS data source
show filtering and sorting
run a built-in SAS task.

1. Invoke Microsoft Excel by selecting Start  All Programs  Microsoft Office  Microsoft Excel.
2. Select SAS  Options from the pull-down menu.
3. The SAS Add-In displays an information window while it connects to the SAS Metadata Server.

9-14

Chapter 9 Using SAS Add-In for Microsoft Office

4. If prompted, enter the user name and password provided by your instructor.

Select

5. The Options window opens with the Data tab selected.

This tab is where you can set the number of observations to display as each page of data is
requested from the SAS Server.

9.2 Using the SAS Add-In for Microsoft Office

6. Select the Results tab.

This tab can be used to set how the results are returned, HTML or CSV.
Using this tab you can also select whether or not the SAS log should be displayed.

9-15

9-16

Chapter 9 Using SAS Add-In for Microsoft Office

7. Select the Graph tab.

This tab is where you can select the image format for graph. The valid values are as follows:

ActiveX
ActiveX image
GIF
JPEG
PNG.

9.2 Using the SAS Add-In for Microsoft Office

8. Select the Tasks tab.

9. Change the default SAS server to use SASMain instead of Local (the default).

9-17

9-18

Chapter 9 Using SAS Add-In for Microsoft Office

10. Select the Stored Processes tab.

11. Select

to close the Options window and save the changes.

9.2 Using the SAS Add-In for Microsoft Office

9-19

Run a Stored Process Using the SAS Add-In for Microsoft Office
12. Select SAS  Browse SAS Programs from the pull-down menus (or select

on the toolbar).

a. Expand the Stored Processes tree (select Stored Processes  Samples) and select Stored
Processes.
b. Select Sample: Frequency Analysis of Municipalities.

c. Select

Sample stored processes are automatically provided with the Web Infrastructure Kit.
These samples can be run to verify that the system is configured properly and to sample
the capabilities of stored processes.
.

9-20

Chapter 9 Using SAS Add-In for Microsoft Office

The program results are streamed back to an Excel worksheet which is given the name of the
stored process.

The results are displayed in a read-only worksheet, so the values cannot be updated. To edit the
worksheet, select Tools  Protection  Unprotect Sheet.

If you always want the sheet unprotected, you can specify that by selecting SAS 
Options and then deselecting the Protect data worksheet check box on the Data tab.

9.2 Using the SAS Add-In for Microsoft Office

9-21

Send Results from Excel to Word


13. Select SAS  Send to Microsoft Word (or select

from the toolbar).

When an analysis is selected to be sent to Word, the stored process runs again to incorporate
any changes that were made to the data source before the analysis is seen. After the output is
available in the Word document, the document can be edited and new text added using the
functionality of Microsoft Word.

9-22

Chapter 9 Using SAS Add-In for Microsoft Office

14. You can also run stored processes directly from Microsoft Word. Select SAS 
Browse SAS Programs.
a. If prompted, enter the user name and password provided by your instructor.

b. Navigate to the stored processed created earlier by expanding the tree (select Stored Processes 
Training).
c. Select Orion Customer List.

Select

9.2 Using the SAS Add-In for Microsoft Office

9-23

15. Because this stored process has a parameter, you are prompted to enter a value. Type 10 and select
.

The output from the Stored Process is streamed back to the cursor position in the current
document unless the Insert results into current document option is
deselected on the Results tab of the SAS Options in Word.

16. Close Word by selecting File  Exit (do not save the changes).

9-24

Chapter 9 Using SAS Add-In for Microsoft Office

Managing Favorites
17. Back in Excel, select SAS  My SAS Favorites  Manage Favorites.
18. Add a stored process sample to My SAS Favorites.
a. Expand Stored Processes and Samples, select Stored Processes.
b. Right-click Sample: Frequency Analysis of Municipalities.
c. Select Add to Favorites.

19. Add another stored process to My SAS Favorites.


a. Select Training.
b. Right-click Orion Customer List.
c. Select Add to Favorites.

9.2 Using the SAS Add-In for Microsoft Office

20. Add a Task to My SAS Favorites.


a. Expand SAS Tasks and Describe.
b. Right-click One-Way Frequencies.
c. Select Add to Favorites.

21. Close the Manage Favorites window by selecting

22. Select My SAS Favorites from the toolbar, notice that the newly added favorites are on the list:

9-25

9-26

Chapter 9 Using SAS Add-In for Microsoft Office

23. Organize favorites by selecting Manage Favorites.


24. Select the New Favorites Folder icon (

) and type Samples as the name of the new folder

25. Drag the Sample: Frequency Analysis of Municipalities and drop it into the new folder Samples.
26. Select

to close the Manage Favorites window.

Add SAS Data to Excel


The SAS Add-In for Microsoft Office allows Excel access SAS data from a server or your local machine
and add it to an Excel workbook.
27. Select SAS  Open SAS Data Source from the pull-down menus (or select
a. Select Servers from the Shortcut Bar, then choose SASMain.

from the toolbar).

9.2 Using the SAS Add-In for Microsoft Office

Select

b. Select Orion Star Gold Library, then choose

c. Select CUSTOMER_DIM, then choose

If you cannot read the entire name of a table, use the View Mode icon on the toolbar
to change the view to Detail or List.

9-27

9-28

Chapter 9 Using SAS Add-In for Microsoft Office

The first page of data is streamed back to an Excel worksheet which is given the name of the
library reference and table name.

Working with Data in Excel Using the SAS Add-In


Excel limits the number of rows available in a worksheet to 65,536 and the columns to 256.
By adding data sources to your workbook via SAS, you can open data sources that are larger than 65,536
rows or have more than 256 columns, or both. The SAS Add-In has options to set number of rows to view
and provides a mechanism to select only the columns you want to see.
The SAS Data Analysis toolbar can be used to navigate through the data, apply a filter, sort the data, and
restrict which columns to display.

9.2 Using the SAS Add-In for Microsoft Office

28. Click on the range of records (1-5000) from the SAS Data Analysis toolbar to change the starting
point (or select SAS  Navigate SAS Data Source  Go To Record).

29. Type in a value of 4000, then click on

The worksheet now displays records 4000-8999.

9-29

9-30

Chapter 9 Using SAS Add-In for Microsoft Office

The default number of rows that is displayed can be changed from the Data tab of the SAS
Options window in Excel.

The arrow tools on the SAS Data Analysis toolbar allows scrolling through the data. The arrows with the
bars next to them take you all the way to the beginning or end of the data. The single arrows scrolls one
page of data at a time (5,000 rows by default).
30. Select

(or SAS  Navigate SAS Data Source  Go to End).

31. Select

(or SAS  Navigate SAS Data Source  Go to Start).

9.2 Using the SAS Add-In for Microsoft Office

SAS Data Can Be Subset in Excel by Using a Filter


32. Filter the data so that only United States customers who are also Orion Star Group Members are
displayed.
a. Select

on the SAS Data Analysis toolbar (or select SAS  Filter SAS Data Source).

b. Select

in the first box and select the desired column name, Customer Country.

c. Select

in the second box and specify the filter criteria, Is equal to.

9-31

9-32

Chapter 9 Using SAS Add-In for Microsoft Office

d. Select

e. Select
f.

Select

in the third box and select the desired value, US.

.
in the last box and specify a condition (AND) in order to create combination filter.

9.2 Using the SAS Add-In for Microsoft Office

g. Complete the new line of the filter for


Customer Group Name Is equal to Orion Club Gold members.

h. Select

i.

Select

to validate the filter.

to close validation window.

9-33

9-34

j.

Chapter 9 Using SAS Add-In for Microsoft Office

Select

to open the Advanced Expression Editor window.

The Advanced Expression Editor is very similar to the editor in SAS ETL Studio.

k. Select
filter to the data.

to close the Advanced Expression Editor window and apply the specified

l.

to close the More Data Options window and apply the specified filter to the

Select
data.

9.2 Using the SAS Add-In for Microsoft Office

The expression is evaluated on the Workspace Server and the first page of filtered data is
returned to Excel.

The filter icon changes from

to

to indicate that a filter is applied.

9-35

9-36

Chapter 9 Using SAS Add-In for Microsoft Office

SAS Data Can Be Sorted in Excel by Specifying a Sort Criteria


33. Sort the data by the customers first and last names.
a. Select

on the SAS Data Analysis toolbar, or select SAS  Sort SAS Data Source.

b. Select

in the box and select Customer Last Name.

c. To sort by first name within last name, select


First Name.

in the second box and select Customer

9.2 Using the SAS Add-In for Microsoft Office

d. Select

to close the More Data Options window and sort the data.

The data is sorted on the Workspace Server and the first page of sorted data is returned to
Excel.

9-37

9-38

Chapter 9 Using SAS Add-In for Microsoft Office

Built-In SAS Tasks are Helpful in Analyzing Data


34. Select SAS  Browse SAS Programs.
a. Expand SAS Tasks and select Describe  One-Way Frequencies.

b. Select
available columns.

. The One-Way Frequencies Experimental Wizard opens with a list of the

9.2 Using the SAS Add-In for Microsoft Office

c. Select Customer_Age_Group and Customer_Gender as Analysis variables.

d. Select Statistics in the list on the left, then select Frequencies and percentages.

9-39

9-40

Chapter 9 Using SAS Add-In for Microsoft Office

e. Select Plots in the list on the left, then select Horizontal.

Select

9.2 Using the SAS Add-In for Microsoft Office

9-41

The frequency task runs and displays the results in the worksheet that is given the name of the
SAS task.

35. Close Excel by selecting File  Exit (do not save the changes).

9-42

Chapter 9 Using SAS Add-In for Microsoft Office

Exercises

1. Working with a Stored Process


Invoke Microsoft Excel and run the Stored Process Sample named
Sample: European Demographic Data Detail.

Add the stored process as a favorite.


Export the results to Microsoft Word.

2. Accessing, Filtering, and Sorting SAS Data


In Microsoft Excel, open the ProductDim table from the Target Tables Library.

Filter the data so that the only items displayed are those where Outdoor is contained within
product group.

9.3 Solutions to Exercises

9.3 Solutions to Exercises


1. Working with a Stored Process
a. Invoke Microsoft Excel program by selecting Start  Programs  Microsoft Office 
Microsoft Excel.
b. Select SAS  Browse SAS Programs from the pull-down menus.
c. Navigate to the samples folder by expanding the tree (select Stored Processes  Samples 
Stored Processes).
d. Select Sample: European Demographic Data Detail, then

The program results are streamed back to an Excel worksheet.

9-43

9-44

Chapter 9 Using SAS Add-In for Microsoft Office

e. Select SAS  Send to Microsoft Word.

f. Select File  Exit to close Word (do not save the changes).
g. Select SAS  My SAS Favorites  Manage Favorites.
h. Expand Stored Processes and Samples.
i. Select Stored Processes and right-click on Sample: European Demographic Data Detail.
j. Select Add to Favorites.

k. Close the Manage Favorites window by selecting

9.3 Solutions to Exercises

l. Select My SAS Favorites from the toolbar notice that the newly added favorite is on the list.

2. Accessing, Filtering, and Sorting SAS Data


a. Select SAS  Open SAS Data Source from the pull-down menus.
b. In the Open SAS Data Source window, select Servers from the Shortcut Bar, then choose
.
SASMain. Select
c. Select Targed Tables Library, then choose
d. Select ProductDim, then choose

.
.

e. Select the filter icon on the SAS Data Analysis toolbar (or select SAS 
Filter SAS Data Source).

9-45

9-46

Chapter 9 Using SAS Add-In for Microsoft Office

f. Specify an expression of Product Group Contains Outdoor.

g. Select

to close the More Data Options window and apply the specified filter.

h. Select File  Exit to close Excel (do not save the changes).

Chapter 10 SAS Information


Map Studio
10.1 Overview of the SAS Information Map Studio ..........................................................10-3
10.2 Using SAS Information Map Studio.........................................................................10-12
10.3 Solutions to Exercises .............................................................................................10-52

10-2

Chapter 10 SAS Information Map Studio

10.1 Overview of the SAS Information Map Studio

10.1 Overview of the SAS Information Map Studio

A Problem
In most businesses, there are many information
consumers who need reports from business data, but
relatively few IT professionals available to meet their
requests.

Information
Consumers
Overworked IT
3

There is often a backlog of requests that cannot be filled quickly enough to meet the business needs.

A Solution?
One way to reduce this backlog is to empower the
end users so that they can create more of their own
reports, leaving IT to the business of managing and
developing mission critical applications.
Allowing end users access to business data gives them
the ability to create reports quickly and make changes
as often as needed.

10-3

10-4

Chapter 10 SAS Information Map Studio

Understanding the Data


Unfortunately, empowering end users is not as easy as
just telling them how to get to the data and turning them
loose with Excel spreadsheets.
Most people outside of the IT department are not trained
to understand and interpret the complex data structures
that store business data.

What Are SAS Information Maps?


SAS Information Maps consist of metadata that describe
a data warehouse in business terms. This provides the
ability to take a ubiquitous data warehouse and surface it
to business users in context to the way they work.

10.1 Overview of the SAS Information Map Studio

What Are SAS Information Maps?


Instead of seeing a multitude of tables and columns

Physical Data View


STREETCODE

COUNTY

MUNICIPALITY

STREETID: DECIMAL(15)
STREETNAME: CHARACTER(30)
STREETCODE: NUMERIC(8)
ZIPCODE: NUMERIC(3) (FK)

ZIPCODE: NUMERIC(3)

MUNICIPALITY: CHARACTER(18)

MUNICIPALITY: CHARACTER(18) (FK)

COUNTY: CHARACTER(18)

CUSTOMER

CUSTTYPE

ORGANIZATION

CUSTTYPE: NUMERIC(3)

CUSTOMERNO: NUMERIC(8)

CUSTTYPENAME: CHARACTER(18)
CUSTGROUP: NUMERIC(3)
CUSTGROUPNAME: CHARACTER(40)

SOCIAL_SECURITYNO: CHARACTER(15)
NAME: CHARACTER(30)
ADDRESS: CHARACTER(30)
STREETID: DECIMAL(15) (FK)
STREETNO: NUMERIC(3)
CUSTTYPE: NUMERIC(3) (FK)

ACCMAN: NUMERIC(3)
ORGNAME: CHARACTER(40)
ORGLEVEL: NUMERIC(3) (FK)
ORGREFID: NUMERIC(3) (FK)

ORGLEVEL
ORDER

ORGLEVEL: NUMERIC(3)

PRODUCT

ORDERID: NUMERIC(8)

PRODUCTNO: NUMERIC(8)

ACCMAN: NUMERIC(3) (FK)


CUSTOMERNO: NUMERIC(8) (FK)
ORDERDATE: DATE
DELIVERDATE: DATE

ORGTEXT: CHARACTER(40)

PRODUCTNAME: CHARACTER(18)
SUPPLIERID: NUMERIC(3) (FK)
PRODUCTNIV: NUMERIC(3) (FK)
PRODUCTREFID: NUMERIC(8) (FK)

ITEMS

SUPPLIER
SUPPLIERID: NUMERIC(3)
SUPPNAME: CHARACTER(30)
SUPPADDRESS: CHARACTER(30)
SUPPSTREETNO: NUMERIC(3)
SUPPZIPCODE: NUMERIC(3)

PRICELIST

ORDERID: NUMERIC(8) (FK)


ITEMS: NUMERIC(3)

PRODUCTNO: NUMERIC(8) (FK)


STARTDT: DATE

PRODUCTNO: NUMERIC(8) (FK)


AMOUNT: NUMERIC(8)
PRICE: NUMERIC(8)

PRODLEVEL
PRODLEVEL: NUMERIC(3)

ENDDATE: DATE
UNITPRICE: NUMERIC(8)

PRODTEXT: CHARACTER(40)

What Are SAS Information Maps?


the user gets a list of business terms that they can
select. These items are surfaced with relevant labels that
are customized for the business user.

Information Map
STREETCODE

COUNTY

MUNICIPALITY

STREETID: DECIMAL(15)
STREETNAME: CHARACTER(30)
STREETCODE: NUMERIC(8)
ZIPCODE: NUMERIC(3) (FK)

ZIPCODE: NUMERIC(3)

MUNICIPALITY: CHARACTER(18)

MUNICIPALITY: CHARACTER(18) (FK)

COUNTY: CHARACTER(18)

CUSTOMER

CUSTTYPE
CUSTTYPE: NUMERIC(3)

CUSTOMERNO: NUMERIC(8)

CUSTTYPENAME: CHARACTER(18)
CUSTGROUP: NUMERIC(3)
CUSTGROUPNAME: CHARACTER(40)

SOCIAL_SECURITYNO: CHARACTER(15)
NAME: CHARACTER(30)
ADDRESS: CHARACTER(30)
STREETID: DECIMAL(15) (FK)
STREETNO: NUMERIC(3)
CUSTTYPE: NUMERIC(3) (FK)

ORGANIZATION
ACCMAN: NUMERIC(3)
ORGNAME: CHARACTER(40)
ORGLEVEL: NUMERIC(3) (FK)
ORGREFID: NUMERIC(3) (FK)

ORGLEVEL
ORDER
ORDERID: NUMERIC(8)
ACCMAN: NUMERIC(3) (FK)
CUSTOMERNO: NUMERIC(8) (FK)
ORDERDATE: DATE
DELIVERDATE: DATE

ITEMS
ORDERID: NUMERIC(8) (FK)
ITEMS: NUMERIC(3)
PRODUCTNO: NUMERIC(8) (FK)
AMOUNT: NUMERIC(8)
PRICE: NUMERIC(8)

PRODUCT
PRODUCTNO: NUMERIC(8)
PRODUCTNAME: CHARACTER(18)
SUPPLIERID: NUMERIC(3) (FK)
PRODUCTNIV: NUMERIC(3) (FK)
PRODUCTREFID: NUMERIC(8) (FK)

PRICELIST
PRODUCTNO: NUMERIC(8) (FK)
STARTDT: DATE
ENDDATE: DATE
UNITPRICE: NUMERIC(8)

ORGLEVEL: NUMERIC(3)
ORGTEXT: CHARACTER(40)
SUPPLIER
SUPPLIERID: NUMERIC(3)
SUPPNAME: CHARACTER(30)
SUPPADDRESS: CHARACTER(30)
SUPPSTREETNO: NUMERIC(3)
SUPPZIPCODE: NUMERIC(3)
PRODLEVEL
PRODLEVEL: NUMERIC(3)
PRODTEXT: CHARACTER(40)

...

10-5

10-6

Chapter 10 SAS Information Map Studio

What Are SAS Information Maps?


An information map contains metadata about
 the physical tables used in the information map
 how the tables relate to each other
 how to surface data items to end users
 business rules.

Because SAS Information Maps consist of metadata, they can contain all the information that allows the
application to generate query code.
Metadata about the data sources
The data source can be SAS data sets, SAS9 OLAP cubes, or a third party database such as Oracle,
Teradata, DB2, or MS Excel. Information maps can access anything that SAS can read.
Metadata about data relationships
Multiple relational data tables can be combined or joined. This allows the application to optimize queries,
regardless of the data source.
Metadata about the data items and their usage
The information map can store metadata that controls the display and usage of the data items. For
example, you can decide that a certain data item should not be used in a sort or to compute statistics.
Metadata about business rules
Standard calculations and filters can be predefined, so business users do not need to re-create them every
time they are needed.

10.1 Overview of the SAS Information Map Studio

10-7

Who Uses Information Maps?


Information maps are used by business users when they
are asking questions of the data.
Because the warehouse is surfaced in terms they
understand, business users can be more self-sufficient
with ad hoc questions and reports.
Reporting applications such as SAS Web Report Studio,
which is targeted at business users, surface information
maps as data sources for queries and reports.

10

SAS Information Map Studio


SAS Information Map Studio provides the bridge between
your data warehouse and the end user who builds reports
from the data.
Physical
Data Warehouse

SAS ETL Studio

Builds
warehouse
metadata

Business
Metadata
SAS Information
Map Studio
Reads
warehouse
metadata

Reporting

SAS Web Report


Studio

Report
Builds
Viewing
Information
Maps
Reads
Information
Maps

SAS Metadata
Server

Ad-hoc
Reporting

Builds and
reads report
metadata

11

The SAS Metadata Server manages the metadata and provides security, while the SAS Web Report Studio
product enables the user to create reports.

10-8

Chapter 10 SAS Information Map Studio

SAS Information Map Studio


SAS Information Map Studio is a Java application used
to create, edit, and manage SAS Information Maps.
The application runs on several Windows operating
systems:
 Windows NT
 Windows 2000
 Windows XP.

12

Where Are Information Maps Used?


End users can access information maps through
 SAS Web Report Studio (create reports)
 SAS Information Delivery Portal (view only)
 SAS Solutions (SAS Marketing Automation)
 custom applications developed through
SAS AppDev Studio.

13

10.1 Overview of the SAS Information Map Studio

Who Will Build Information Maps?


SAS Information Map Studio is targeted at data modelers
or data architects who
 have experience in data modeling
 are familiar with SQL, MDX, or both
 know the physical data
 have a strong understanding of the business domain.
Most report writers are consumers of information maps for
building reports. Typically, these users do not create
information maps.

14

Data modelers or data architects are typically someone in an IT or MIS unit. This person works very
closely with the business domain experts to understand the types of questions they need to ask as well
as the business context in which they are asked.

Information Maps versus Database Views


Information maps are much more powerful than database
views. In addition to surfacing physical database
variables, they capture metadata about allowable usage
and query generation rules.
 Information maps describe what can be done.
 Information maps hide the physical structure of the
data from the business user. Query code is generated
in the background, so the business user does not
need to know SQL.

continued...
15

10-9

10-10

Chapter 10 SAS Information Map Studio

Information Maps versus Database Views




Information maps support the ability to group data


items logically into folders, providing a simpler way of
locating items.
Information maps contain business rules such as
filters and calculated items. These rules are surfaced
whenever the information map is accessed, providing
consistent and accurate results.

continued...
16

Information Maps versus Database Views




Information maps can be extended by SAS Stored


Processes, integrating the power of SAS
transformations and analytics with business reporting.
Information maps interact with the common OMR
security scheme, allowing for centralized security
management through SAS applications.

17

OMR Open Metadata Repository.

10.1 Overview of the SAS Information Map Studio

Interaction with SAS Application Servers


Information maps can use different types of application
servers:
SAS Metadata
Server

Required to read and write metadata


in a SAS metadata repository.

SAS Workspace Required to execute SAS code and


Server
access data.
SAS OLAP
Server

18

Required to generate information


maps from OLAP cubes.

...

10-11

10-12

Chapter 10 SAS Information Map Studio

10.2 Using SAS Information Map Studio

SAS Information Map Studio Interface


The main window of SAS Information Map Studio is
used to view, create, and modify information maps
and contains the following elements:
 Menu Bar
 Toolbar
 Repository Tree
 Presentation Tab
 Properties Tab
 Relationships Tab.

20

Menu Bar

Contains the drop-down menus for SAS Information Map Studio. Many of the menu
functions are also available from the toolbar and from pop-up menus.

Toolbar

Contains buttons that enable quick access to many of the functions that are available
from the menu bar.

Repository Tree

Displays the information maps in the metadata repository. You can display or hide
the Repository Tree by clicking the View Repository button on the toolbar.

Presentation Tab

Displays the physical data source, data items, and filters for the information map
that is currently open. The Physical Data tree displays the physical data source that
you selected for the map. The Information Map tree displays the information map's
data items and filters.

Properties Tab

Contains the properties table for the information map's data items and filters. You
can select a data item or filter in the left pane to display its properties in the right
pane. From the right pane, you can edit the properties.

Relationships Tab Displays tables, their columns, and the relationships (joins) between tables. You can
create and modify the relationships between tables. You can also add or remove
tables for your information map.

10.2 Using SAS Information Map Studio

Menus and
Tools

...

21

Repository
Tree

22

...

10-13

10-14

Chapter 10 SAS Information Map Studio

Presentation
Tab

23

Properties
Tab

24

...

10.2 Using SAS Information Map Studio

Relationships
Tab

25

Information maps can be created from one or more data tables or a single OLAP cube.

Joining Tables
When joining tables, the default
relationship is an inner join, which
returns only matching rows.
Outer joins can also be used to return non-matching rows.
The modifiers left, full, and right determine which table
contributes the non-matching rows.

Left

26

Full

Right

10-15

10-16

Chapter 10 SAS Information Map Studio

Information Map Data Items


An information map is made up of data items. Each data
item has metadata to specify its properties, such as
 data item name
 description
 classification
 aggregation
 format
 permissions
 value
generation
method.

...

27

Property

Description

Data item name

specifies a descriptive name for the data item; the maximum length is 60
characters.

Description

specifies a description for the data item, which can be viewed by the information
map consumer.

Classification

specifies whether the data item is a category or a measure. The classification of a


data item determines how the data item will be processed in a query.

Aggregation

specifies aggregate functions that the information map consumer can use for
summarizing measure values.

Format

specifies a format for the data item. A description of the format and an example of
a formatted value are displayed to the right of format type and name.

Permissions

specify or deny permissions (rank or sort) for the data item.


Value Generation

Permissions are applicable only to relational data items and OLAP data
items that represent hierarchies.

the method that is used to generate a list of data item values for a filter. When this
data item is selected for a filter, the method that you choose is used to populate a
selection list that the user of a filter definition window can select values from.

Value generation options apply only to relational data items that do not
have an expression type of Date , Time, or Timestamp.

10.2 Using SAS Information Map Studio

10-17

Information Maps Filters


A filter is an information map item that contains criteria to
enable the information map consumer to subset a result
set.
Having filters stored in an information map can be useful
when the filter is complex and difficult for an end user to
build without advance knowledge of data values.

28

Information Maps New Data Items


Information map data items can refer to a physical data
field or a calculation.
When you create a new data item, the underlying data
sources are not changed. You are creating a field that is
created dynamically every time the information map is
accessed. You are not physically saving the result in the
data. It is only a metadata instruction on how to build the
field.

29

This can be an important distinction for performance reasons. If you have a data item that is
complicated to calculate and the map is tied to large data sources, it may be faster and more
efficient if the data item is created in the data warehouse or physical data source. If storage space
is important, it may be better to calculate the field in the information map because the value is not
stored physically.

10-18

Chapter 10 SAS Information Map Studio

Using the SAS Information Map Studio

This demonstration shows how to use SAS Information Map Studio to build a simple information map.

1. Invoke Information Map Studio by selecting Start  All Programs  SAS 


SAS Information Map Studio 1.0.1.
2. Choose the metadata profile BI Architecture.

3. Log in with the username and password provided by your instructor.

10.2 Using SAS Information Map Studio

10-19

Information Map Studio is initialized and the interface is displayed:

Information Map Studio opens without an information map loaded. To create a new information map,
start by inserting a new data source.

You can also access a wizard to create a new information map by selecting
File  New using Wizard from the pull-down menus.
To load an exiting information map, select it from the Repository Tree.

10-20

Chapter 10 SAS Information Map Studio

4. Select

to add data.

The Data Type selection allows you to select either tables or cubes. You can build an information
map from one or more table on the same server, or one cube.

10.2 Using SAS Information Map Studio

5. Expand Orion Star Gold Library and select CUSTOMER_DIM.


Select

The Physical Data Previewer displays the columns in the selected data source.
.

10-21

10-22

Chapter 10 SAS Information Map Studio

The selected data source is displayed in the Physical Data tree.

Numeric fields have a blue circle icon ( ) and character fields use a red triangle ( ).

10.2 Using SAS Information Map Studio

10-23

Begin creating the information map by selecting fields in the Physical Data tree and moving them to the
Information Map tree.
6. Select

to select all the fields from the CUSTOMER_DIM table.

Data items in the information map are initially created


using the column label as the display name
with a default classification of CATEGORY.

10-24

Chapter 10 SAS Information Map Studio

The properties of each data item can be edited using its properties window, which can be accessed by
double-clicking on the field name
right-clicking on the field and selecting Properties
selecting the Properties tab.
7. Right-click on the Customer Age data item and select Properties from the pop-up menu.

10.2 Using SAS Information Map Studio

10-25

a. Select the Classifications/Formats tab.


b. Change the Classification to Measure which activates the Aggregations selections.
c. Change the Default aggregation to AVG(argument).


Select

It is important to choose the proper classification for each data item in the information map
because this setting cannot be changed in the applications that use the information map.
to close the properties window for Customer Age.

10-26

Chapter 10 SAS Information Map Studio

The icon for Customer Age changes to something that looks like a ruler (
measure.

) this indicates it is a

10.2 Using SAS Information Map Studio

10-27

Testing the Information Map


The Test Query button on the toolbar opens a window that allows you to run a basic query against the
information map to make sure that it works as desired.
8. Select

on the toolbar.

a. Select the following:

Customer Age Group


Customer Gender
Customer Age

b. Select Display detailed list of all values.


c. Select Limit the query result to and accept the default value of 100.

Select

10-28

Chapter 10 SAS Information Map Studio

9. If the query is successful, a results window is displayed:

10. Select


Select

to view the SQL statements:

You cannot edit the SQL code shown in the Show Generated Query window, but you can
copy the code into another application and modify it there.
when done viewing the code.

10.2 Using SAS Information Map Studio

11. Select
12. Select

10-29

If Group by category values is selected instead of Display detailed list


of values, the query results will be grouped by the various category values (Customer
Gender and Customer Age), and the measures will use the default aggregation (average
Customer Age in this example).

to close the Results window.


to exit the Data Selection and Query Options for Test window.

10-30

Chapter 10 SAS Information Map Studio

13. Select File  Save to save the information map. The Save As window opens:
a. Select the location to save the map by selecting BIP Tree  ReportStudio  Maps.
b. Enter Customer List in the Name field.
c. Enter a Description of Orion Star Gold Customer Listing.


Select

If this map is intended for use in SAS Web Report Studio, you must save your
information maps in the Foundation/BIP Tree/ReportStudio/Maps folder.
to save the information map and return to the main window.

The newly saved information map shows up in the Repository Tree.

10.2 Using SAS Information Map Studio

10-31

Creating Filters
Create a filter to subset data by age and gender. Because Customer Age is already defined in the
information map as a measure, it needs to be added again so it can be used to create a categorical filter.
14. Select Customer Age in the Physical Data tree then select
tree.

Duplicate data items are automatically renamed.

to add it to the Information Map

10-32

Chapter 10 SAS Information Map Studio

15. Double-click Customer Age1 to open the Data Item Properties window. Change the Data item name
to Age Category and select

The new data item is displayed in the Information Map tree.

10.2 Using SAS Information Map Studio

16. Select

to define specifics for this new filter:

a. Specify a Filter Name of Young Males.


b. Specify a Description of Men age 21 and under.
c. Select the field Age Category from the drop-down list for the Subset field.
d. Select the Is less than or equal to item from the drop-down list for the Condition field.
e. Specify a Value of 21.

10-33

10-34

f.

Chapter 10 SAS Information Map Studio

Since this filter is based on multiple criteria, select


combinations user interface.
Select

to display the filter

to move the expression just built into the Filter combinations box.

The expression built on Age Category is cleared from the Subset list at the top of the
window and should now appear in the Filter Combinations area.

10.2 Using SAS Information Map Studio

10-35

g. Create the second portion of the filter by selecting Customer Gender from the drop-down list for
the Subset field.
h. Select Is equal to from the drop-down list for the Condition field.
i.

Specify a Value of 'M'.


j.

Select

k. Select

Character values used in filters are case sensitive and must be enclosed in quotes.
to add the expression to the Filter combinations area.

to save the filter.

10-36

Chapter 10 SAS Information Map Studio

17. The filter now appears as an item in the information map:

18. To test the filter, select

a. Select Customer Gender, Customer Birth Date, and Customer Age.


b. Select Young Males.
c. Select Display a detailed list of values.
d. Select Limit the query result to 100 rows.

10.2 Using SAS Information Map Studio

e. Select

f.

Select

g. Select

to close the Results window.


to exit the Data Selection and Query Options for Test window.

10-37

10-38

Chapter 10 SAS Information Map Studio

Creating New Data Items


Create a new data item for the customers birthday month. The value for this data item will be derived
using the customers birthday.
19. Select

to define specifics for this new data item:

a. Specify Customer Birthday Month as the Data item name.


b. Select

When a new data item is created, you must define the expression before you can enter
any properties for that data item (other than the name).
to open the Expression Editor.

10.2 Using SAS Information Map Studio

c. Specify Month the customer was born as a Description.


d. On the Functions tab, locate the function category Date and Time.
e. Scroll to Month(date) and select

10-39

10-40

f.

Chapter 10 SAS Information Map Studio

Select the Data Sources tab, expand Physical Data and CUSTOMER_DIM, locate Customer
Birth Date from the Customer List information map and select

Both Business Data and Physical Data are available so that you can create an expression
for a new data item based on physical data that may not be in your information map.

10.2 Using SAS Information Map Studio

g. Select

Select

10-41

to ensure the syntax is correct. A message window displays:

to close the Expression Editor window and return to the properties window for
h. Select
the new data item.
i.

Select the Classifications/Formats tab and change the format type from Date/Time to Numeric,
specify BEST as the format, and set the width to 2.

j.

Select

to close the properties window for the data item.

10-42

Chapter 10 SAS Information Map Studio

k. Test the new data item by selecting

1) Select Customer First Name, Customer Birth Date, and Customer Birthday Month.
2) Select Display a detailed list of values.
3) Select Limit the query to 100 rows.

10.2 Using SAS Information Map Studio

4) Select

5) Select
6) Select

to close the Results window.


to exit the Data Selection and Query Options for Test window.

20. Save the information map by selecting File  Save (or by selecting

on the toolbar).

10-43

10-44

Chapter 10 SAS Information Map Studio

Adding an Additional Data Source to the Information Map


21. Select

22. Expand the Orion Star Gold Library and select ORDER_FACT.

Select

10.2 Using SAS Information Map Studio

23. Add the following fields to the information map:


Date Order was Placed by Customer
Total Retail Price for This Product
Cost Price Per Unit.
24. Right-click on Total Retail Price for This Product and set the Classification to
Measure.

10-45

10-46

Chapter 10 SAS Information Map Studio

25. Right-click on Cost Price Per Unit and set the Classification to Measure.

10.2 Using SAS Information Map Studio

10-47

26. Select the Relationships tab to define how the tables will be joined together.
Select Customer ID from the CUSTOMER_DIM table, drag and drop on top of Customer ID in the
ORDER_FACT table. By default, this creates an inner join on the two columns.

If your information map contains more than one table, you must define relationships for the
tables.
This tab is disabled if your information map is based on an OLAP data source.

By default, this creates an inner join on the two columns.To change the type of relationship, rightclick on the line connecting the tables and select Properties from the pop-up menu.

10-48

Chapter 10 SAS Information Map Studio

27. Select

to test the join.

a. Select Customer Name, Date Order was Placed by Customer, and


Total Retail Price for This Product.
b. Select Display detailed list of all values.
c. Select Limit the query result to and keep the default of 100.

10.2 Using SAS Information Map Studio

d. Select

e. Select
f.

Select

to close the Results window.


to close the Data Selection and Query Options for Test window.

10-49

10-50

Chapter 10 SAS Information Map Studio

28. Select File  Save As to save the information map with a new name.
a. Specify Customer Orders for the Name.
b. Retain the folder specification of BIP Tree/ReportStudio/Maps/.
c. Specify Orion Star Gold Customer Order Information as the Description.

Select

10.2 Using SAS Information Map Studio

Exercises

Build an information map from an OLAP cube.

1. Create an Information Map for the OrionStar Cube


Create a new information map.
Select Cube as the data source and select the OrionStar cube.
Add all items in the cube to the information map.
Save the information map as Orion Star Cube.
Test the cube by selecting al l data items.
View the query code.

10-51

10-52

Chapter 10 SAS Information Map Studio

10.3 Solutions to Exercises


1. Create an Information Map for the OrionStar Cube
a. Begin creating a new information map by selecting File  New.
b. Add a data source by selecting

c. Select Cubes as the Data type, OrionStar as the data source, and

d. Select

to add all the items in the cube to the information map.

10.3 Solutions to Exercises

10-53

e. Save the new information map by select File  Save As.


f. Type Orion Star Cube as the Name and Information map based on Orion Star
OLAP cube as the Description.

Select

10-54

Chapter 10 SAS Information Map Studio

g. Select


h. Select
i. Select

to test the information map.

The Data Selection and Query Options for Test window for OLAP data sources is
different from the one used for table data souces.
to add all items to the test query.
to run the test.

10.3 Solutions to Exercises

j. Select

This query code is MDX, not SQL.

k. Select

to close the Show Generated Query window.

l. Select

to close the Results window.

m. Select

to close the Data Selections and Query Options for Test window.

n. Close SAS Information Map Studio by selecting File  Exit.

10-55

10-56

Chapter 10 SAS Information Map Studio

Chapter 11 Using SAS Web Report


Studio
11.1 Overview of SAS Web Report Studio ........................................................................ 11-3
11.2 Using SAS Web Report Studio .................................................................................. 11-5
11.3 Solutions to Exercises ............................................................................................. 11-27

11-2

Chapter 11 Using SAS Web Report Studio

11.1 Overview of SAS Web Report Studio

11.1 Overview of SAS Web Report Studio

SAS Web Report Studio


SAS Web Report Studio
 provides non-technical business users the ability to
find, interact with, create, and share reports based
on corporate data
 is designed to meet the specific needs, skills, and
experiences of decision makers at all levels of the
organization who need self-service information quickly
 is intended for users with little or no experience in
other reporting tools or database technology.

SAS Report Model


SAS9 provides the ability to save output to the SAS
Report Model format using the SAS Output Delivery
System (ODS). SAS Web Report Studio will be able to
view ODS output stored in the SAS Report Model XML
format.
Document/
Section

Info
Map

Reporting
Applications

SAS ODS

Style
Info
Map

Colors

Data
Model
View

Language

XML
Serialization

SAS
Report

Table
Embedded
Data

URL
Formats
Text

Image
Graph

Report Components
within technologies
and solutions

11-3

11-4

Chapter 11 Using SAS Web Report Studio

Users can interact with the report by performing operations such as drilling, sorting, filtering, ranking,
exporting, and group break navigation using the Table of Contents. This is feasible because SAS Web
Report Studio stores reports in the common SAS Report Model XML format.

Interaction with SAS Application Servers


SAS Web Report Studio can use any or all of the
following application servers:
SAS Metadata
Server

Required to read and write metadata


in a SAS metadata repository.

SAS Workspace
Server

Required to execute SAS code and


access data.

SAS OLAP
Server

Required to access cube data and


generate MDX queries.

...

SAS Web Report Studio


Which browsers are supported?
 Internet Explorer 5.5 or newer

11.2 Using SAS Web Report Studio

11.2 Using SAS Web Report Studio

Using SAS Web Report Studio


SAS Web Report Studio is started from your browser by
entering a specific URL.
On the classroom machines you use:
http://localhost:8080/SASWebReportStudio

Using SAS Web Report Studio


The main window of SAS Web Report Studio includes
links for
 viewing an
existing report
 creating a
new report
 editing an
existing report
 setting
preferences.

11-5

11-6

Chapter 11 Using SAS Web Report Studio

Using SAS Web Report Studio


New reports can be created using the Report Wizard,
which is uses a point-and-click interface to gather
information to build the report.

10

Using SAS Web Report Studio


Another option for creating reports is the Report Builder,
which allows the information for the report to be entered
on one screen.

11

11.2 Using SAS Web Report Studio

Using SAS Web Report Studio

This demonstration shows how to use SAS Web Report Studio to create a report.

1. Open an Internet Explorer window and enter the following URL:


http://localhost:8080/SASWebReportStudio

2. Enter the user name and password provided by your instructor.

Select

11-7

11-8

Chapter 11 Using SAS Web Report Studio

After logging on, the main window of SAS Web Report Studio is displayed.

There are many options from the main window, including the ability to view an existing
report, create a new report, and set SAS Web Report Studio preferences.

11.2 Using SAS Web Report Studio

3. Begin creating a new report by selecting

The default interface is the Report Wizard you can switch to the Report Builder by
.
selecting
Notice that this is the first of five steps to create a report.
To navigate between the steps, choose either

or

11-9

11-10

Chapter 11 Using SAS Web Report Studio

Step 1 of the Report Wizard Select data for the report


4. Select a data source for the report; select the information map Orion Star Gold Customer Order
Information.

Select

to display the Data Source Information window.

11.2 Using SAS Web Report Studio

11-11

When a data source has been selected, the data items are displayed. Select the desired data items and use
to move them to the Selected Data Items: list.

5. Select the following fields:


Customer Age Group
Customer Country
Customer Gender
Total Retail Price for This Product.

Select

to advance to the next step (step 2).

11-12

Chapter 11 Using SAS Web Report Studio

Step 2 of the Report Wizard Sort or filter data (optional)


6. Change the sort order to Ascending for the following columns:
Customer Age Group
Customer Country
Customer Gender.

If there are any filters in the information map they will be available in the filter box the data
item(s) the filter is based on.

11.2 Using SAS Web Report Studio

A new filter can be created by selecting


new filter window.

11-13

for the selected data item, this opens the Create

11-14

Chapter 11 Using SAS Web Report Studio

7. Select

to view the results of the query.

8. The Preview Data window displays a listing of the query results:


9. Select
10. Select

Select

to export the data to Microsoft Excel.


to close the Preview Data window.

to advance to the next step (step 3).

11.2 Using SAS Web Report Studio

11-15

Step 3 of the Report Wizard Create group breaks (Optional)


11. Select Customer Gender as a Group break.


Select

The default for group breaks is to have a new page for each value. This option produces a
table of contents to navigate to each page of output.
to advance to the next step (step 4).

11-16

Chapter 11 Using SAS Web Report Studio

Step 4 of the Report Wizard Select a table, graph, or both


Tables and graphs can be created for the desired report. If the Graph check box is not available, it is
because a measure is not identified in the data.
12. Select the Table check box (if not already selected).
a. Enter Sales by Gender, Age, and Country as the Title for the Table.
13. Select the Graph check box.
a. Enter Retail Price Analysis as the Title for the Graph.
b. Select Pie for the graph type.
c. Specify Total Retail Price for This Product as the variable to set the segment size.
d. Specify Customer Age Group as the variable to set the segments.

Select

to advance to the next step (step 5).

11.2 Using SAS Web Report Studio

Step 5 of the Report Wizard Define the header and footer


14. Enter Orion Star Marketing Data Mart as the Text for the Report header.

Select

to exit the Report wizard and create the reports.

11-17

11-18

Chapter 11 Using SAS Web Report Studio

The report is displayed in the browser. Because the report is grouped by Customer Gender, a table of
contents area is displayed on the left to enable users to page between the values.

Scroll to see both the graph and the table.

11.2 Using SAS Web Report Studio

15. View information for the next group by selecting Males in the Table of Contents.

Across the top of this report preview there are a set of buttons.
Modify

Returns to Report wizard for modifications

Options

Provides a choice to either left-align or center the report, and to


choose between different styles for the report

Print

Opens the print properties window

Save

Allows report to be saved

Create New

Invokes Report wizard to start on a new report

The icons at the top of each section provide additional functionality for the section.
Edit options
Export table/graph
Table/graph information

11-19

11-20

Chapter 11 Using SAS Web Report Studio

Save the Report


16. Select

to save the report.

17. Select My folders and specify Customer Sales Analysis as the Report name.

Select

to save the report.

11.2 Using SAS Web Report Studio

Copy the Report


18. Select the Choose Report tab at the top of the Web Report Studio window, and then select
My Folders.

19. The Actions button to provides the ability to issue various commands for the selected report.

11-21

11-22

Chapter 11 Using SAS Web Report Studio

20. Select the actions button (

) for the Customer Sales Analysis report and select Copy.

21. In the Copy Report window, select Shared folders and then Reports.

Select
22. Choose

to perform the copy.


to verify that the report was copied to this common report area.

11.2 Using SAS Web Report Studio

23. Select the actions button (

) for the Customer Sales Analysis report and select Rename.

24. Type in Shared Customer Sales Analysis.

Select

to rename the file.

The list of reports is displayed showing the new name of the report.

11-23

11-24

Chapter 11 Using SAS Web Report Studio

Change SAS Web Report Studio Preferences


25. Select

11.2 Using SAS Web Report Studio

26. Select the Report Creation tab and supply default header text of
Orion Star Marketing Data Mart.

Select
27. Select

.
to close out of SAS Web Report Studio.

11-25

11-26

Chapter 11 Using SAS Web Report Studio

Exercises

1. Create a Sales Report


Create a new report using the Customer List information map created in the previous section.
Select the Customer Country, Customer Age, and Customer Gender data items.
Do not sort or filter any of the data items.
Do not specify any group breaks.
Create a table using all the fields.
Create a bar graph using Customer Age as the vertical axis, Customer Country as
horizontal axis, and divide the bars by Customer Gender.
Accept the default headers and footers.
Save the report in My folders with the name Customer Age Analysis.
Log off Web Report Studio and close the browser.

11.3 Solutions to Exercises

11-27

11.3 Solutions to Exercises


1. Create a Sales Report
a. Open Web Report Studio and log in with username and password provided by your instructor.
b. Select

c. Create a new report using the Orion Star Customer Listing information map and the
Customer Country, Customer Age, and Customer Gender data items.

Select

to advance to the next step (step 2).

d. Do not sort or filter any of the data items.

Select

to advance to the next step (step 3).

11-28

Chapter 11 Using SAS Web Report Studio

e. Do not specify any group breaks.

Select

to advance to the next step (step 4).

f. Create a table using all the fields and a bar graph using Customer Age as the vertical axis,
Customer Country as horizontal axis, and divide the bars by Customer Gender.

Select

to advance to the next step (step 5).

11.3 Solutions to Exercises

g. Accept the default headers and footers.

Select

to exit the Report wizard and create the reports.

11-29

11-30

Chapter 11 Using SAS Web Report Studio

11.3 Solutions to Exercises

h. Save the report in My folders with the name Customer Age Analysis
1) Select

to save the report.

2) Enter Customer Age Analysis as the Report name.

3) Select

to save the report.

i. Log off SAS Web Report Studio and close the browser.
1) Select

to close out of SAS Web Report Studio

2) Select File  Close to close the browser.

11-31

11-32

Chapter 11 Using SAS Web Report Studio

Chapter 12 Using SAS Information


Delivery Portal
12.1 Overview of the SAS Information Delivery Portal.....................................................12-3
12.2 Using the SAS Information Delivery Portal.............................................................12-14

12-2

Chapter 12 Using SAS Information Delivery Portal

12.1 Overview of the SAS Information Delivery Portal

12-3

12.1 Overview of the SAS Information Delivery Portal

SAS Information Delivery Portal


The SAS Information Delivery Portal provides an interface
to access enterprise data, applications, and information.
The SAS Information Delivery Portal
 is built on top of SAS BI Architecture
 provides a single point of entry
 provides a Portal API for application development.

Using a centralized search tool, you can search for information from across the enterprise that is appropriate
for your role in the organization.

12-4

Chapter 12 Using SAS Information Delivery Portal

SAS Information Delivery Portal


The SAS Information Delivery Portal has many features,
including the following:
 The portal's personalization features, which enable
you to organize your portal desktop so that it contains
only the information you need, in the format that
makes the most sense to you.
 The ability to subscribe to publication channels that
deliver continually updated information to your
desktop.
 A secure environment for sharing information with
other users.

SAS Information Delivery Portal

Page

Portlet

...

12.1 Overview of the SAS Information Delivery Portal

SAS Information Delivery Portal


The Information Delivery Portal uses pages and portlets
to organize information.
 A page is a Web page in the SAS Information Delivery
Portal that contains portlets. Each page is represented
by a tab in the portal's navigation bar.
 Portlets are the rectangular components of a portal
page and are used to organize content.

You can create, add, edit, rearrange, and remove pages in your personal portal. Pages can be shared either
publicly or with a group of users.
A page can contain any number of portlets.

Content Types
Some of the main content types that can be added to
portlets are
 links
 SAS Information Maps
 SAS Reports
 Stored Processes
 Alerts.

12-5

12-6

Chapter 12 Using SAS Information Delivery Portal

Content Types Links


Links are content that are accessible using a universal
resource locator (URL).

Link

...

Content Types SAS Information Maps


SAS Information Maps are user-friendly metadata
definitions of physical data sources that enable business
users to query a data warehouse to meet specific
business needs.

SAS
Information Map

12.1 Overview of the SAS Information Delivery Portal

Content Types SAS Reports


SAS Reports are reports that have been stored in the
SAS Report Model format.

SAS Reports

10

Content Types Stored Processes


Stored Processes are SAS programs that are stored in a
central location and can be executed from the portal,
creating reports that include the most current data.

SAS Stored
Process
11

12-7

12-8

Chapter 12 Using SAS Information Delivery Portal

Content Types Alerts


An alert is an automatic notification of an electronic event.
Alerts are displayed in the Alerts Portlet on one of your
personal portal pages. Alerts can be used to notify you
that a stored process has finished executing in the
background and that the results are ready to view.

12

Stored processes that run in the background display the message Stored Process/<name> submitted for
background processing when you execute them. This message means that you can continue working on other
tasks while processing continues in the background. When the stored process finishes executing, a notice
appears in your Alerts portlet. You can then click the alert message to see the results of the stored process.

In order for stored processes to execute in background, the portal must be installed with WebDAV
support.

12.1 Overview of the SAS Information Delivery Portal

Other Content Types


Content Type

Description

application

A Web application that has been made accessible


from the portal.

file

A file of any type. Files might be available for


viewing if your organization has installed the portal
with the Xythos WebFile Server.

package

A collection of structured and unstructured content


that has been published using the SAS publishing
framework.

publication channel

A channel that has been established using the


SAS publishing framework and can be used to
publish information to users and applications.

syndication channel A channel that provides syndicated, continuously


updated Web content.
13

What Is WebDav?
WebDAV is a set of extensions to HTTP, the HyperText
Transfer Protocol, to allow remote collaborative authoring.
HTTP does a very good job of letting users browse
content already published on the Web, but it is not very
good at allowing users to post their own content.
WebDAV makes the Web writable as well as readable, in
a standard, interoperable, way.

14

With just HTTP, there is no standard way to move a file, to lock or unlock it, or to add metadata or
properties to the file. WebDAV standardizes all those functions.

12-9

12-10

Chapter 12 Using SAS Information Delivery Portal

Xythos WebDav
Xythos
 is a secure WebDav server
 uses a relational database
 is not required for the SAS Information Delivery Portal,
but some important features are not supported if
Xythos is not part of the installation.

15

The Xythos WebFile Server (WFS) is a scalable, Internet-based file management solution, that allows users to
securely store, modify, and share files from any Web-enabled device. Additionally, WFS is a full-featured
WebDAV (level 2) server, providing users with file management functionality via any WebDAV-enabled client
application. Using WebDAV and other Web standards, WFS helps enterprise customers find and share
information from any Internet location while improving file system security and reducing the load on e-mail
systems.
To find out more about Xythos, go to their Web site: http://www.xythos.com/home/xythos/index.html

12.1 Overview of the SAS Information Delivery Portal 12-11

Content Classification
The content contained within the pages and portlets can
be classified as one of the following:

Public

Group

Personal.

16

Public Content Classification


Public content is content that has been shared with the
portal's Public group so that all portal users can access it.
You can share content with the Public group and then edit
and delete that content only if you are designated either
as a content administrator for the public group or as a
portal administrator.

17

12-12

Chapter 12 Using SAS Information Delivery Portal

Group Content Classification


Group content is content that has been shared with a
group of portal users so that all users in the group can
access it. You can share content with a group and then
edit and delete that content only if you are designated
either as a content administrator for the target group or
as a portal administrator.

18

Personal Content Classification


Personal content is content that you created. If you have
the appropriate level of authorization, then you can create
pages, collection portlets, WebDAV navigator portlets,
and links.
After you create these items, you can access them from
the portal, edit them, remove them from your personal
portal, use the Search tool to find them, or delete them
permanently. Other portal users cannot access your
personal content.

19

Depending on which software your organization has installed, the features that are listed above might
be available only to users who are authorized as content administrators.

12.1 Overview of the SAS Information Delivery Portal 12-13

Interaction with SAS Application Servers


The SAS Information Delivery Portal can potentially use
any or all of the following application servers:
SAS Metadata
Server

Read metadata for all repository


objects and write metadata for
some repository objects.

SAS OLAP Server View multidimensional information


maps and reports.

continued...
...

20

Interaction with SAS Application Servers

21

SAS Workspace
Server

Publish packages and retrieve


published packages. Execute
stored processes with package
results. View relational information
maps and reports.

Stored Process
Server

Execute stored processes with


streaming results.

...

12-14

Chapter 12 Using SAS Information Delivery Portal

12.2 Using the SAS Information Delivery Portal

Using the SAS Information Delivery Portal


The SAS Information Delivery Portal is started from your
browser by entering a specific URL.
On the classroom machines you use:

http://localhost:8080/Portal

23

12.2 Using the SAS Information Delivery Portal 12-15

Using the SAS Information Delivery Portal

This demonstration shows how to use the SAS Information Delivery Portal.

1. Open an Internet Explorer window and enter the following URL:


http://localhost:8080/Portal
The SAS Information Delivery Portal Public Kiosk is displayed. This is the default page that all users see
before they sign on to the portal:

12-16

Chapter 12 Using SAS Information Delivery Portal

2. Select Log On to sign on to the portal.


3. Enter the User name and Password provided by the instructor.

4. Select

12.2 Using the SAS Information Delivery Portal 12-17

The initial content displayed contains one page with two portlets:

Page

My Collection Portlet

Bookmarks Portlet

A collection portlet is a portlet that contains a list of portal content items. To use a collection
portlet, click the name of an item in the list. Depending on the content type, the portal will
either display the item or launch a new application in your browser window.
A bookmark portlet is a predefined portlet that enables you to maintain a list of content items
that you want to refer to later. Bookmarks are generally used to maintain a list of content items
for short-term use.

12-18

Chapter 12 Using SAS Information Delivery Portal

Add Content to the My Collection Portlet


Each portlet has a set of tools on the title bar:

5. Select the Edit icon,

, in the My Collection porlet.

6. The Name or Description of the portlet can be changed, and keywords can be added to help in searches.


Select

The asterisk indicated that the Name field is required.


.

12.2 Using the SAS Information Delivery Portal 12-19

7. The Create tab is selected by default. Create a new link by entering a name, description, URL, and
keywords for the SAS Web site.

Select

A message indicates that the link was added:

12-20

Chapter 12 Using SAS Information Delivery Portal

8. Select the Search tab to search for existing content to add. To search for all available content, type an
asterisk in the Keywords field, select the Select All check box.

9. Select

12.2 Using the SAS Information Delivery Portal 12-21

10. The available content is displayed. Select the box next to the following items to add to the Collection
porlet:
Customer Age Analysis.srx (report)
Customer List (information map)
Orion Customer List (stored process)

Select
11. Select

.
when you are finished added content to the Collection portlet.
You may need to scroll the to the bottom of the page to find the

button.

12-22

Chapter 12 Using SAS Information Delivery Portal

12. Type Orion Star Marketing Data Mart in the Name field and Information built in
class in the Description field.

13. Select

the updated portlet is displayed.

12.2 Using the SAS Information Delivery Portal 12-23

View the Content of the Collection Porlet


14. Select Customer Age Analysis.srx to view the report created in SAS Web Report Studio.

15. Select

to return to the portal page.

12-24

Chapter 12 Using SAS Information Delivery Portal

16. Select Customer List to view the data surfaced by the information map using the Visual Data Explorer.

12.2 Using the SAS Information Delivery Portal 12-25

17. Display data in the Visual Data Explorer by selecting the following in the Available items list:
Customer Age
Customer Country
Select
Select

18. Select

.
.

to return to the portal page.

12-26

Chapter 12 Using SAS Information Delivery Portal

19. Select Orion Customer List to run and view the results of the stored process.

20. Select

at the end of the Number of Records row.

21. Change the value to 10 and select

and

12.2 Using the SAS Information Delivery Portal 12-27

The stored process is executed using the parameter specified, and the results are streamed back to the
portal window.

22. Select

to return to the portal page.

12-28

Chapter 12 Using SAS Information Delivery Portal

Add a Portlet to a Page


23. Select Options  Add Portlets.

24. Select the Search tab, type an asterisk in the Keywords field, and select

25. Select the check box for Alerts Portlet and SAS Information Maps Navigator.

Select

12.2 Using the SAS Information Delivery Portal 12-29

26. Select

The new portlets are added to the page.

12-30

Chapter 12 Using SAS Information Delivery Portal

27. Change the layout of the page by selecting Options  Edit.


28. Move the SAS Information Maps Navigator to Column 2 by selecting it and selecting

Select

12.2 Using the SAS Information Delivery Portal 12-31

The Home page is updated and the new layout is displayed.

12-32

Chapter 12 Using SAS Information Delivery Portal

29. Select Orion Star Cube from the SAS Information Maps Navigator portlet to open the Visual Data
Explorer and load the OLAP data surfaced by the information map.

30. Explore the options of this visual data explorer.


31. When finished, select

to return to the portal page.

32. Select Log Off to return to the Log On screen.


33. Select File  Close to close the browser.

También podría gustarte