Intelligence Platform Data Administration Guide
Intelligence Platform Data Administration Guide
4 Intelligence
®
Platform
Data Administration Guide
Fifth Edition
SAS® Documentation
The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2015. SAS® 9.4 Intelligence Platform: Data
Administration Guide, Fifth Edition. Cary, NC: SAS Institute Inc.
SAS® 9.4 Intelligence Platform: Data Administration Guide, Fifth Edition
Copyright © 2015, SAS Institute Inc., Cary, NC, USA
Whatʼs New
What’s New in Data Administration for
the SAS 9.4 Intelligence Platform
Overview
This document focuses on the SAS Intelligence Platform and establishing connectivity
to your data sources (and data targets). Here are the changes and enhancements:
n integration of SAS with the DataFlux suite
n support for limiting access to libraries
n new localize table batch tool
n discontinued support for SAS Data Surveyor products
n support for on-disk AES encryption
n documentation enhancements
viii Data Administration
Instead of being licensed separately, DataFlux products are now being combined into
SAS software offerings that include other SAS products as well. For example, the SAS
Data Management Advanced offering includes Base SAS and the SAS Metadata Server
as well as DataFlux Data Management Studio and Data Management Server. These
new offerings replace the current SAS Enterprise Data Integration Server offering and
enable customers to choose from a broader array of data management products.
Some DataFlux products are changing their names to SAS, and others will in the future.
In SAS 9.4, DataFlux Federation Server is now SAS Federation Server, and DataFlux
qMDM Solution is now SAS MDM.
Documentation Enhancements
In the third maintenance release for SAS 9.4, if SAS Visual Analytics is part of your
deployment, you can create and maintain SAS LASR Analytic Servers and SAS LASR
Analytic Server libraries using the SAS Environment Manager. The following sections
were added:
n Stage 1: Register a SAS LASR Analytic Server Using SAS Environment Manager
n Stage 2: Register a SAS LASR Analytic Server Library Using SAS Environment
Manager
n Register the Base SAS Library Using SAS Environment Manager
n Create a SAS/SHARE Remote Engine Library Using SAS Environment Manager
Generic instructions for using the User Manager plug-in within the SAS Management
Console were added:
n Define the DBMS User
n Define the DBMS User Group
Starting in the second maintenance release for SAS 9.4, a new support site for Hadoop
was added to the SAS Third-Party Software Reference site: http://support.sas.com/
resources/thirdpartysupport/v94/hadoop/.
xii Data Administration
xiii
Accessibility
For information about the accessibility of any of the products mentioned in this
document, see the usage documentation for that product.
xiv Data Administration
1
1
Overview of Common Data Sources
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Hadoop Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
External Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
XML Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Message Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Overview
This chapter describes the features of the most common data sources that you
encounter as you perform administrative tasks. In addition, a simple diagram is provided
for each data source that shows how the data flows as connections are established
between source storage, SAS engines and servers, and SAS applications.
Hadoop Data
Hadoop is an open-source software framework that provides distributed storage and
processing of large amounts of data. The data is divided into blocks and stored across
multiple connected nodes (computers) that work together. These connected nodes form
a cluster. The Hadoop Distributed File System (HDFS) provides distributed data storage
and processing. HiveServer2 is a distributed data warehouse component that is built on
top of HDFS. HiveServer2 includes the SQL query language HiveQL.
n SAS Scalable Performance Data (SPD) Server stores and accesses SPD Server
tables in HDFS.
SAS Data
Workspace Server
Integration Studio
For a detailed example of a SAS data set connection, see “Establishing Connectivity to
a Library of SAS Data Sets” on page 72.
SAS/SHARE supports multi-user Read and Write access to both SAS data files and
SAS catalogs. Multi-user access to SAS catalogs simplifies the maintenance of
applications by allowing users and developers to share the same program libraries.
Users can execute applications at the same time that developers update the source
programs.
SAS/SHARE software also acts as a data server that delivers data to users for their
processing needs. This capability provides data administrators both a centralized point
Local and Remote Access to Data 5
of control for their data and a secure environment to control who accesses the data.
SAS/SHARE is also designed to be a reliable data server that functions as long as the
system that the server is running on is operational.
Finally, SAS/SHARE enables you use SAS software to define views of your data. This
allows administrators to restrict certain users to subsets of data for security or efficiency
purposes. Access to rows and columns in SAS tables can be defined using this
technique. The following figure shows shared access to SAS data sets. Note that the
data server in the figure can be a different operating system and architecture from the
SAS Application Server, if the site is licensed for that configuration.
SAS/SHARE
Base SAS Engine
REMOTE Engine
Library of
SAS Data Sets
For a detailed example of a shared SAS data set connection, see “Establishing Shared
Access to SAS Data Sets” on page 78.
sets that are local to the SAS Application Server have a fully qualified path such as C:
\data\sourcetables:
Often, file-based data is stored on a host that is remote from the SAS Application
Server. When the hosts have a network path for shared directories such as a Windows
UNC path or UNIX NFS, that path is used. The following figure shows an example of a
SAS Workspace Server accessing a UNC path, \\dataserver\sourcetables, on a
data server.
Note: Data cannot be accessed via mapped drives on the SAS Application Server. You
must use the UNC path.
External Files 7
Note: This figure shows a SAS Workspace Server accessing data over a shared file
system. To access data over network connection (without the file system), use
SAS/SHARE as described in this document.
External Files
An external file is a file that is maintained by the machine operating environment or by a
software product other than SAS. A flat file with comma-separated values is one
example. SAS Data Integration Studio provides three source designer wizards that
enable you to create metadata objects for external files:
n the delimited external file wizard for external files in which data values are separated
with a delimiter character. This wizard enables you to specify multiple delimiters,
nonstandard delimiters, missing values, and multi-line records.
n the fixed-width external file wizard for external files in which data values appear in
columns that are a specified number of characters wide. This wizard enables you to
specify non-contiguous data.
8 Chapter 1 / Overview of Common Data Sources
n the user-written external file wizard for complex external files that require user-
written SAS code to access their data.
The external file source designer wizards enable you to do the following:
n display a raw view of the data in the external file
n display a formatted view of the data in the external file, as specified in the SAS
metadata for that file
n display the SAS DATA step and SAS INFILE statement that the wizard generates for
the selected file
n display the SAS log for the code that is generated by the wizard
n specify options for the SAS INFILE statement that is generated by the wizard, such
as National Language Support (NLS) encoding
n override the generated SAS INFILE statement with a user-written statement
n supply a user-written SAS DATA step to access an external file
SAS Data
Workspace Server
Integration Studio
XML Data
The XML LIBNAME engine works in a way similar to other SAS engines. A LIBNAME
statement is executed so that a libref is assigned and an engine is specified. That libref
is then used throughout the SAS session.
Instead of the libref being associated with the physical location of a SAS library, the
libref for the XML engine is associated with a physical location of an XML document.
When you use the libref that is associated with an XML document, SAS either translates
the data in a SAS data set into XML markup or translates the XML markup into SAS
format.
The XML LIBNAME engine can read input streams from a web service input and write
an output stream to a web service output. The XML LIBNAME engine supports reading
XML files in complex structures using XMLMaps. An XMLMap is a user-defined file that
contains XML tags that tell the XML LIBNAME engine how to interpret an XML
document. XMLMaps are defined using the SAS XML Mapper product. For additional
information, see the SAS XML LIBNAME Engine: User's Guide.
XML files are written by the XML Writer transformation provided by SAS Data
Integration Studio. The XML LIBNAME engine supports Output Delivery System (ODS)
tag sets; XMLMaps are not supported for writing. The XML Writer transformation in SAS
Data Integration Studio is shipped with a sample ODS tag set, if needed. An output XML
document can either be:
n used by a product that processes XML documents
n moved to another host for the XML LIBNAME engine to process by translating the
XML markup back to a SAS data set
Because the XML LIBNAME engine is designed to handle tabular data, all the data sent
to or from a web service must be in table form.
The following figure shows connectivity to XML files:
10 Chapter 1 / Overview of Common Data Sources
SAS Data
Workspace Server
Integration Studio
Message Queues
Message queues are collections of data objects that enable asynchronous
communication between processes. These processes are typically applications that run
on different computers, and might be configured in a heterogenous network. Queue
management software ensures that messages are transmitted without error. SAS Data
Integration Studio can perform messaging jobs to read and write messages to Microsoft
MSMQ as well as IBM WebSphere MQ. For more information about administering
message queues, see SAS Intelligence Platform: Desktop Application Administration
Guide. For more information about creating messaging jobs, see SAS Data Integration
Studio: User's Guide.
Relational Database Sources 11
SAS/ACCESS
Data can also be stored in third-party hierarchical and relational databases such as
DB2, Oracle, Microsoft SQL Server, and Teradata. SAS/ACCESS interfaces provide
fast, efficient reading and writing of data to these facilities.
Several of the SAS/ACCESS engines support threaded Reads. You can use this to read
entire blocks of data on multiple threads instead of reading data just one record at a
time. This feature can reduce input and output bottlenecks so that thread-enabled
procedures can read data quickly. These engines can also access database
management system (DBMS) data in parallel by using multiple threads to the parallel
DBMS server.
Here are some of the SAS/ACCESS engines that support this functionality:
n DB2 under UNIX and PC Hosts
n ODBC
n Oracle
n Sybase
n Teradata
For more information about using the SAS/ACCESS interfaces, see SAS/ACCESS for
Relational Databases: Reference. The following figure shows how connectivity to Oracle
databases is configured:
12 Chapter 1 / Overview of Common Data Sources
SAS Data
Workspace Server
Integration Studio
SAS/ACCESS
Oracle Server
Interface to Oracle
Oracle Client
ODBC Sources
Open database connectivity (ODBC) standards provide a common interface to a variety
of databases such as DB2, Microsoft Access, Oracle, and Microsoft SQL Server
databases. Specifically, ODBC standards define application programming interfaces
(APIs) that enable an application to access a database if the ODBC driver complies with
the specification.
a driver manager with SAS/ACCESS to ODBC. For UNIX platforms, you should
obtain an ODBC driver manager from your ODBC driver vendor.
n The ODBC administrator defines a data source as the data that is used in an
application and the operating system and network that are used to access the data.
You create a data source by using the ODBC Administrator in the Windows Control
Panel and then selecting an ODBC driver. You then provide the information (for
example, data source name, user ID, password, description, and server name) that
is required by the driver to make a connection to the desired data. The driver
displays dialog boxes in which you enter this information. During operation, a client
application usually requests a connection to a named data source, not just to a
specific ODBC driver.
n An ODBC Administrator tool is not available in a UNIX environment such as HP-UX,
AIX, or Solaris. During an install, the driver creates a generic .odbc.ini file that can
be edited to define your own data sources.
The following figure shows how ODBC is used to establish connectivity to Oracle
databases:
The following figure shows how ODBC is used to establish connectivity to Access
databases:
14 Chapter 1 / Overview of Common Data Sources
SAS Data
Workspace Server
Integration Studio
ODBC Driver
Database Tables
Manager
ODBC Driver
The SPD Engine is a SAS LIBNAME engine that is included with Base SAS software. It
is a single-user data storage solution that shares the high-performance parallel
processing and parallel I/O capabilities of SPD Server, but it is not a server. It can read
and store data in SAS libraries, including data in Hadoop HDFS. For more information
about SPD Engine data in HDFS, see SAS SPD Engine: Storing Data in the Hadoop
Distributed File System.
The SPD Server is not part of Base SAS. It is a multi-user parallel-processing data
server that includes an SPD Server LIBNAME engine and a comprehensive security
infrastructure, backup and restore utilities, and sophisticated administrative and tuning
options. The SPD Server libraries can be defined using SAS Management Console.
SPD Engine and SPD Server use multiple threads to read blocks of data very rapidly
and in parallel. The software tasks are performed in conjunction with an operating
system that enables threads to execute on any of the machine's available CPUs.
Although threaded I/O is an important function of both products, their real power comes
from how the software structures SAS data. They can read and write partitioned files
and, in addition, use a specialized file format. This data structure permits threads,
running in parallel, to perform I/O tasks efficiently.
Although not intended to replace the default Base SAS engine for most tables that do
not span volumes, SPD Engine and SPD Server are high-speed alternatives for
processing very large tables. They read and write tables that contain billions of
observations.
The SPD Engine and SPD Server performance are boosted in these ways:
n support for terabytes of data
n scalability on symmetric multiprocessing (SMP) machines
n parallel WHERE selections
n parallel loads
n parallel index creation
n partitioned tables
n parallel I/O data delivery to applications
16 Chapter 1 / Overview of Common Data Sources
Symmetric Multiprocessing
The SPD Server exploits a hardware and software architecture known as symmetric
multiprocessing (SMP). An SMP machine has multiple CPUs and an operating system
that supports threads. An SMP machine is usually configured with multiple disk I/O
controllers and multiple disk drives per controller. When the SPD Server reads a data
file, it launches one or more threads for each CPU; these threads then read data in
parallel. By using these threads, an SPD Server that is running on an SMP machine
provides the quick data access capability that is used by SAS in an application.
For more information about using the SPD Server, see http://support.sas.com/rnd/
scalability/spds and SAS Scalable Performance Data Server: Administrator's Guide.
SAS Data
Workspace Server
Integration Studio
SAS Scalable
SPDS Engine Performance Data
Server
SPDS Tables
Dynamic Clustering
The SPD Server provides a virtual table structure called a clustered data table. A cluster
contains a number of slots, each of which contains an SPD Server table. The clustered
data table uses a layer of metadata to manage the slots.
This virtual table structure provides the SPD Server with the architecture to offer flexible
storage to allow a user to organize tables based on values contained in character and
numeric columns, including SAS date, time, or datetime values. This new type of
organization is called a dynamic cluster table. Dynamic cluster tables enable parallel
loading and selective removal of data from very large tables, making management of
large warehouses easier. These unique capabilities provide organizational features and
performance benefits that traditional SPD Server tables cannot provide.
Dynamic cluster tables can load and process data in parallel. Dynamic cluster tables
provide the flexibility to add new data or to remove historical data from the table by
accessing only the slots affected by the change, without having to access the other
slots, thus reducing the time needed for the job to complete. In addition, a complete
refresh of a dynamic cluster table requires a fraction of the disk space that would
otherwise be needed, and can be divided into parallel jobs to complete more quickly. All
of these benefits can be realized using simple SPDO procedure commands to create
and alter a cluster.
The two most basic commands are CLUSTER CREATE and CLUSTER UNDO. Two
additional commands are CLUSTER ADD and CLUSTER LIST. You execute each of
these commands within PROC SPDO.
The following example shows the syntax for PROC SPDO with a CLUSTER CREATE
command:
PROC SPDO LIBRARY=domain-name;
CLUSTER CREATE cluster-table-name
MEMBER=SPD-Server-table1
18 Chapter 1 / Overview of Common Data Sources
MEMBER=SPD-Server-table2
MEMBER=SPD-Server-table3
MEMBER=SPD-Server-table4
MEBERM=SPD-Server-table5
MEMBER=SPD-Server-table6
MEMBER=SPD-Server-table7
MEMBER=SPD-Server-table8
MEMBER=SPD-Server-table9
MEMBER=SPD-Server-table10
MEMBER=SPD-Server-table11
MEMBER=SPD-Server-table12;
QUIT;
These operations run quickly. These features reduce the downtime of the table for
maintenance and improve the availability of the warehouse.
SAS Data Surveyors 19
The SAS Data Management offerings include DataFlux Data Management Server,
additional Quality Knowledge Bases, DataFlux Data Management Studio, and other
SAS and SAS DataFlux products. DataFlux Data Management Server runs jobs and
real-time services that are created in DataFlux Data Management Studio. The jobs and
real-time services can be executed by SAS programs that contain the procedures and
functions in SAS Data Quality Server. Among its many capabilities, the DataFlux Data
Management Studio software enables you to create jobs and real-time services and
customize the data definitions in Quality Knowledge Bases.
SAS Data Integration Studio is part of the SAS Data Integration Server offering, and it
provides software that enables data quality applications. SAS provides data quality
transformations that enable you to analyze data, cleanse data, or trigger the execution
of DataFlux jobs or real-time services on DataFlux Data Management Servers.
22 Chapter 1 / Overview of Common Data Sources
The data quality software requires setup and configuration after installation. For
administrative information, see “Administering SAS Data Integration Studio” in SAS
Intelligence Platform: Desktop Application Administration Guide.
23
2
Managing Table Metadata
By using optional statements, you can also use PROC METALIB to perform the
following tasks:
n Delete metadata for tables that have been removed from the library.
n Produce a report that lists the changes made by the procedure or the potential
changes that will be made when the procedure is executed.
n Operate on a subset of the tables in a library.
Note: For detailed information about the procedure, see "METALIB Procedure" in SAS
Language Interfaces to Metadata.
Note: PROC METALIB cannot work with a library that is registered with the Pre-
assigned Library resource template. When pre-assigning a library, be sure to choose
the resource template specific to the type of data source library that you are creating
and select the Library is pre-assigned check box. Do not use the specialized Pre-
Assigned Library template. Also, if the library is pre-assigned and you run the PROC
METALIB in a Foundation SAS session, you must make sure the library is allocated by
either submitting a LIBNAME statement for the library in that SAS session, or by using
the METAAUTORESOURCES option to access the library through a SAS server to
which the library is assigned.
Creating Table Metadata for a New Library 25
The remainder of the chapter presents examples of how PROC METALIB is commonly
used. The examples assume that you have set the following metadata server
connection options in your SAS session:
options METAUSER="metadata-server-userid"
METAPASS="metadata-server-password"
METAPORT=metadata-server-port
METASERVER="metadata-server-machine";
If you have not set these options, you can use PROC METALIB parameters to specify
this information.
The following example shows how to use PROC METALIB to create initial table
definitions for the tables in a library. The REPORT statement causes the procedure to
write information about the table definitions that it creates.
proc metalib;
omr (library="lib1" repname="Foundation" );
report;
run;
26 Chapter 2 / Managing Table Metadata
The report that is generated by the code sample resembles the following:
The following example shows how to use the NOEXEC and REPORT statements to
assess potential metadata changes:
proc metalib;
omr (library="lib1" repname="Foundation" );
update_rule=(delete);
noexec;
Assessing Potential Changes in Advance 27
report;
run;
Note: The UPDATE_RULE statement tells the procedure to delete table definitions for
any tables that have been deleted from the library. For more information about this
statement, see “Changing the Update Rule” on page 29.
The report that is generated by the code sample resembles the following:
Use REPORT when you want an output listing that summarizes metadata changes,
either before changes are made (by using NOEXEC) or to see afterward what changes
were actually made. SAS output is the default.
Without the REPORT statement, the options are written to the SAS log. The output
resembles the following example:
105 proc metalib;
106 omr (library="lib1" repname="Foundation" );
107 run;
NOADD
specifies not to add table metadata to the metadata repository for physical tables
that have no metadata.
NOUPDATE
specifies not to update existing table metadata to resolve discrepancies with the
corresponding physical tables.
DELETE
specifies to delete table metadata if a corresponding physical table is not found in
the specified library.
The following example shows how to use UPDATE_RULE with DELETE, NOADD, and
NO UPDATE to delete table definitions that are no longer valid, as well as suppress the
default add and update actions:
proc metalib;
omr (library="lib1" repname="Foundation" );
30 Chapter 2 / Managing Table Metadata
When you set the SELECT statement, you can choose the tables for processing:
n For tables, specify their SAS name. If no table definition is found in metadata, it is
created in the repository that contains the library object. If a matching table definition
is found in metadata, it is compared to the physical table. If differences are found,
the table definition is updated in metadata.
n For tables already registered in metadata, specify either the unique metadata
identifier or the value in the SASTableName attribute. If you specify the metadata
identifier, only the specified table definition is updated, not the first table definition in
the association list.
If you use the SASTableName value and there is more than one metadata table
object with the same name, then PROC METALIB impacts only the first one that is
Updating Your Table Metadata to Match Data in Your Physical Tables 31
found. By using the metadata ID instead, you guarantee that PROC METALIB
affects the specific table that you want to manage.
You can use EXCLUDE to specify a single table or a list of tables to exclude from
processing.
The following example shows how to use EXCLUDE to exclude a specific subset of
tables:
proc metalib;
32 Chapter 2 / Managing Table Metadata
For information about using batch tools, see “About the SAS Intelligence Platform Batch
Tools” in SAS Intelligence Platform: System Administration Guide and “General
Instructions for Using the SAS Intelligence Platform Batch Tools” in SAS Intelligence
Platform: System Administration Guide.
Using the Localize Table Batch Tool 33
-host host-name
Specifies the SAS Metadata Server host. This option is required if -profile is not
set.
-log log-file-name
Specifies the log file or directory.
-password password
Specifies the user login password. This option is required if -profile is not set or if
the profile does not contain connection credentials.
-port port-name
Specifies the SAS Metadata Server port. This option is required if -profile is not
set.
-profile file-name
Specifies the SAS Metadata Server connection profile. This option can be used
in place of the -host, -port, -user, and -password options.
-user user-ID
Specifies the user login identity. This option is required if -profile is not set or if
the profile does not contain connection credentials.
table-location-and-name
Specifies the metadata location (relative to SAS Folders) and name of the table that
is being localized. This is a required argument.
-key column-name
Specifies the key column for a localization detail table.
-locale column-name
Specifies the locale column for a localization detail table.
-localize column=detail-table-path
Specifies columns to be localized with a localization detail table. This option can be
repeated.
-reset
Erases all localization metadata for this table.
-rowPerLocale
Specifies that the table uses the row per locale localization model.
Using the Localize Table Batch Tool 35
-tablePerLocale
Specifies that the table uses the table per locale localization model.
The following command erases all localization metadata of the current table:
sas-localize-table connect-options table-location-and-name -reset
The following command specifies the columns to localize for the detail table:
sas-localize-table connect-options table-location-and-name -localize
column=detail-table-path
The following command associates the table with the row per locale model:
sas-localize-table connect-options table-location-and-name -rowPerLocale
-locale column-name
The following command associates the table with the table per locale model:
sas-localize-table connect-options table-location-and-name -tablePerLocale
Adding new locale data to the table requires adding data to the PRODUCT table. This
action forces a rebuild of the indexes on the table. Also, the non-localized data must be
repeated for every locale.
The following code creates a single table named PRODUCT, which contains the product
information and localized data:
After you register the PRODUCT table in metadata, use the sas-localize-table tool to
associate the localization in metadata. For example, if the path to the library is '/Shared
Data/Product Data', your sas-localize-table command is as follows:
sas-localize-table <connect-options> '/Shared Data/Product Data/Product'
-rowPerLocale -locale PRODUCT_LOCALE
PRODUCT_SKU CHAR(10),
PRODUCT_COLOR CHAR(20) character set ASCII,
PRODUCT_DESC CHAR(255) character set ASCII );
After you register the PRODUCT table and the localized tables in metadata, use the
sas-localize-table tool to associate the localized table in metadata. For example, if the
path to the library is '/Shared Data/Product Data', your sas-localize-table command is as
follows:
sas-localize-table <connect-options> '/Shared Data/Product Data/Product'
-tablePerLocale
2 locale column
3 value column
Using the Localize Table Batch Tool 39
The detail tables model uses separate detail tables for each column that requires
localization. The data column contains a locale invariant key value that maps to a key
column in the detail table. The detail table also contains a locale column and one or
more value columns.
A full view of the data table is generated by performing a left join of the data table to the
detail table and filtering based on the current locale. The localized value columns from
the detail table are joined to the unlocalized columns in the original data table.
The models create a detail table entitled PRODUCT. The key column (PRODUCT_ID) is
matched to the column value in the original data table. The locale column
(PRODUCT_LOCALE) value specifies the locale for a given row. Once you find the row
40 Chapter 2 / Managing Table Metadata
in the localization detail table with the key value matching your original data and the
appropriate locale, you can use the value column to get the localized value.
When you use the sas-localize-table batch tool to set up a localization detail table, you
are doing the following:
n marking the table as a localization detail table
n identifying the key column
n identifying the locale column
You do not need to identify the value column because any column that is not a key or
locale column is assumed to be a value column.
The next step is to associate a localization detail table with a specific column in a data
table. The specified column in the data table has values that can be looked up in the
key column of the detail table.
The following code creates two tables:
n a master table containing the non-localized information
n a detail table containing the localized information
After you register the PRODUCT table and each PRODUCT_DETAIL table in metadata,
use the sas-localize-table tool to associate the localized table in metadata. For example,
if the path to the table is '/Shared Data/Product Data', then use the following sas-
localize-table commands to create the detail table and associate it with the PRODUCT
table in metadata:
sas-localize-table <connect-options> '/Shared Data/Product Data/Product_Detail'
-key PRODUCT_ID -locale LOCALE_CD
Use the following command to view the localization that is applied to the PRODUCT
table:
sas-localize-table <connect-options> '/Shared Data/Product Data/PRODUCT'
42 Chapter 2 / Managing Table Metadata
43
3
Assigning Libraries
Pre-assigning a Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Overview of Pre-assigning a Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Stage 1: Flag the Library as Pre-assigned . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Stage 2: Edit the Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Pre-assigning Libraries to Use the Metadata Engine . . . . . . . . . . . . . . 56
Pre-assigning Libraries in an Autoexec File . . . . . . . . . . . . . . . . . . . . . . . . 57
SAS Application Server Autoexec Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Assigning a library to a SAS server means letting the SAS server session know that a
libref—a shortcut name—is associated with the information that a SAS session needs to
access a data library. SAS Intelligence Platform clients such as SAS Data Integration
Studio, SAS OLAP Cube Studio, and SAS Information Map Studio generate SAS code
that uses librefs. Before the generated code can access data from a library, the library
must be assigned to the SAS server that executes the code. After the SAS server
determines that a library is assigned to it, the next step is to determine how the SAS
server should access the data in the library.
There are two ways in which a server can determine how to access data in a library.
One way is for you, as the administrator, to configure the environment so that the SAS
server finds out about the libref and the SAS engine to use for data access at server
start-up. This approach is referred to as pre-assigning the library, because the libref is
established before any code that uses that libref is submitted. The other way is to let the
client application define the libref and set the SAS engine when it generates code for
submission to that server.
How Do the Different Platform Clients Assign Libraries? 45
The following table shows which SAS engine is used by many of the platform clients for
libraries that are not pre-assigned.
Minimum Metadata
Library Engine Authorizations
Application Pre-assigned Used Required
Minimum Metadata
Library Engine Authorizations
Application Pre-assigned Used Required
When libraries are not pre-assigned, each SAS platform client accesses data with the
SAS engine that makes the most sense for the client. Allowing each client to choose the
SAS engine that it deems appropriate for its user base results in a security model that
might match data access requirements. The clients that are typically used for data
building use the native engine. The clients that are typically used for queries and
reporting are designed to use the metadata engine. An example of such an environment
is one with clients running at least SAS Enterprise Guide and SAS Data Integration
Studio. In this environment, SAS Data Integration Studio processes update tables that
are in turn used in ad hoc analysis within SAS Enterprise Guide. The SAS Data
Integration Studio processes need to specify tables in the library as target tables
(output), whereas the SAS Enterprise Guide user's activities largely involve querying
and analyzing chunks of data (input).
Because SAS Data Integration Studio processes typically update or create target tables,
it is designed to use the native engine instead of the metadata engine. It accesses the
tables using the engine that is specified in metadata for the library. Because SAS Data
Integration Studio works with tables that are registered in the metadata repository, you
can control access to tables by granting ReadMetadata, WriteMetadata, and
CheckInMetadata permissions on the library and table metadata objects.
Note: The metadata authorization layer supplements operating system and RDBMS
security. It does not replace it. Operating system and RDBMS authorization should
always be used as the first means of securing access to tables.
Understanding Pre-Assigned Libraries 47
On the other hand, the SAS Add-In for Microsoft Office and SAS Enterprise Guide use
the metadata engine by default. For these clients, the data-level authorizations of Read,
Write, Create, and Delete that are specified in metadata, are enforced.
If defining libraries so that they are not pre-assigned seems like a potential option for
your environment, then you should also learn how to ensure that these libraries are
available to server processes that do not receive direct requests from client
applications. For example, you need to know how to assign the library in server
processes such as the stored process server and DATA Step Batch Server (if present).
For more information, see “Considerations for SAS Stored Process and SAS Pooled
Workspace Servers” on page 50.
Which engine you use affects security and determines what operations are possible.
Note: If you are defining a pre-assigned DBMS library, do not use the Pre-Assigned
Library resource template. Register the library using the appropriate DBMS library
template.
If you pre-assign libraries, then you control which engine is used to access the data.
If you choose to pre-assign libraries with LIBNAME statements in an autoexec file, then
you should still register the library in metadata. Registering the library in metadata
48 Chapter 3 / Assigning Libraries
makes it available for use by SAS clients that read from metadata, such as SAS Data
Integration Studio.
Having the server process assign libraries upon start-up results in library assignments
that are identical and guaranteed across all SAS client applications and servers. Some
environments where this approach to assigning libraries is desirable include the
following:
n environments where users are executing stored processes, and you do not want
programmers having to manage library assignments in their code or in autoexec
files.
n environments where the DATA Step Batch Server is used to execute jobs created by
SAS Data Integration Studio, and library assignments for these jobs should be
identical to assignments used when the process was created.
n environments where SAS Enterprise Guide or SAS Add-In for Microsoft Office users
are running tasks that need to create tables in the library that is registered in
metadata. When you register a client-assigned library (a library that is not pre-
assigned), SAS Enterprise Guide and SAS Add-In for Microsoft Office assign the
library to use the metadata engine by default. Metadata engine libraries do not
update metadata after changes to the underlying data source. Metadata can be
updated to reflect changes to the underlying data source with PROC METALIB or
with the register tables function of SAS Management Console.
When libraries are assigned by the client application, each application can assign the
library in a way that is most suitable for its intended user base, and library connections
are established only if needed. When libraries are assigned by the server, each library is
available to all server processes and each library is allocated the same way for all client
applications. A mixture of some server-assigned and some client application-assigned
libraries is typically required to meet the needs of all the users in your environment.
Understanding Native Engines and the Metadata LIBNAME Engine 49
SAS metadata provides a metadata authorization layer that enables you to control
which users can access which metadata objects, such as SASLibrary, PhysicalTable,
and LogicalServer. You manage the access to metadata by granting ReadMetadata and
WriteMetadata permissions on the object or on the repository.
50 Chapter 3 / Assigning Libraries
As depicted in the previous figure, when a user accesses a library that uses the
metadata engine, the engine sends a request to the SAS Metadata Server to determine
the user’s metadata permissions on the tables in the library. The tables for which the
user has ReadMetadata access are returned and are available to the user. If the user
then performs an action, such as opening a table, the metadata engine queries the
metadata server for the user’s metadata permission on the table. If the user has Read
access to the table, directly or through group membership, the metadata engine then
calls upon the engine specified in metadata to handle the request. The table is then
opened into the client application for reading.
In contrast, for clients such as SAS Data Integration Studio that surface only the tables
that are registered in metadata and accessible to the user, if a user accesses a library
that uses a native engine, the client application contacts the metadata server and
requests access to the metadata object as the user. The metadata server then queries
the metadata authorization layer to determine whether the user has ReadMetadata
access on the tables in the library. In contrast to the metadata engine, there is no query
to check for Read access on the table. When a library uses a native engine, the data-
level authorizations of Read, Write, Create, and Delete are not checked.
If you want to use the metadata authorization layer to control Read, Write, Create, and
Delete permissions, then pre-assign the library. Follow the steps described in “Pre-
assigning a Library” on page 53. When you use the Pre-assignment Type menu,
select By metadata library engine.
One drawback to using the metadata engine is that it does not automatically create,
update, or delete metadata when changes are made to the tables.
written in the stored process program or that is linked to the stored process with an
%INCLUDE statement from an external file.
It is important to understand how SAS Stored Process Servers and SAS Pooled
Workspace Servers access data in libraries that are pre-assigned or not pre-assigned,
and how they use the metadata engine or a native engine. The following table describes
how these interactions affect data access.
Table 3.2 SAS Engine Assignment Interactions for SAS Stored Process and SAS Pooled
Workspace Servers
Library is pre- n The library is assigned to use n The library is assigned to use
assigned the metadata engine at server the native engine for the library
initialization by the SAS type at server initialization by
Spawned Servers account the SAS Spawned Servers
(sassrv). account (sassrv).
n Metadata authorization layer n Metadata authorization layer
permissions for the SAS permissions are checked for
Spawned Servers account are the SAS Spawned Servers
checked at server initialization account. The SAS Spawned
and for each data access Servers account must have
request. ReadMetadata access to the
n Metadata authorization layer library. (The access is typically
permissions for the user ID that inherited through a grant to the
uses the server are not used. SAS General Servers group.)
The metadata authorization
layer permissions for the user
ID that uses the server are not
used.
Library is not pre- n The library is not assigned at n The library is not assigned at
assigned server initialization. It is server initialization. It is
assigned to use the metadata assigned to use a native
engine by the SAS code that is engine by the SAS code that is
submitted to the server. submitted to the server.
n The metadata authorization n Metadata authorization layer
layer and data-level permissions are not used.
permissions are checked for They are never checked for the
the user ID that submits the SAS Spawned Servers
code. account or the user ID that
n The SAS Spawned Servers uses the server.
account metadata
authorization layer permissions
are not used.
* If you change metadata permissions on a pre-assigned library or its tables, you must restart the SAS
Object Spawner. This is needed so that the SAS server initializes again.
TIP Regardless of the engine used and whether the library is pre-assigned or not
pre-assigned, if the library is a Base SAS library, then the SAS Spawned Servers
account must have operating system permissions for the path to the physical library.
The operating system permissions for the user ID that submitted the code are not
used.
Error Messages
If the library is not pre-assigned, then check the syntax for your LIBNAME statement. If
the library is pre-assigned to use the metadata engine, then make sure that the SAS
General Servers identity has ReadMetadata permission to the library. If the library is
pre-assigned to use a native engine, then make sure that the user ID accessing the
data has ReadMetadata permission to the library.
This message is generated for libraries that use the metadata engine only. If the table
belongs to a pre-assigned library, then grant Read permission to the SAS General
Servers identity on the table. If the table does not belong to a pre-assigned library, then
grant Read permission to the user identity on the table.
ERROR: File libref.table.DATA does not exist.ERROR: The metadata for the table/
view libref.table does not exist.
This message is generated for libraries that use the metadata engine only and means
that the table is not registered in metadata. If the library is pre-assigned to use the
metadata engine, then disable that setting temporarily while you register the table. If you
do not disable the pre-assignment, then be aware that the library is assigned to use the
metadata engine with the METAOUT=ALL option. This METAOUT option does not
permit registering tables.
Pre-assigning a Library
Note: Keep in mind that pre-assigning the library does not mean that you do not need
to register tables in metadata. You must register the tables so that applications that read
tables from metadata, such as SAS Data Integration Studio, can work with the tables.
54 Chapter 3 / Assigning Libraries
4 Select the Library is Pre-Assigned check box on the Pre-Assign tab, and select
an option from the Pre-Assignment Type menu.
TIP Select By external configuration when you want to pre-assign the library in
a configuration file, such as an autoexec.
7 Select the servers that you want to pre-assign the libraries to. Click OK when you
are finished.
Figure 3.3 The Assign Tab for a Library Properties Dialog Box
and add a METAAUTORESOURCES SAS system option. This option is used so that
the servers read the library definitions from metadata as they start.
Note: This stage is not needed for workspace servers, pooled workspace servers,
stored process servers, SAS/SHARE servers, or OLAP servers. Those server types
automatically read metadata when they start and assign the libraries.
SAS-configuration-directory\Lev1\SASApp\ConnectServer\sasv9_usermods.cfg
Add the following SAS system option:
-metaautoresources 'SASApp'
2 For each DATA Step Batch server, edit the following file:
SAS-configuration-directory\Lev1\SASApp\BatchServer\sasv9_usermods.cfg
Add the following SAS system option:
-metaautoresources 'SASApp'
in metadata as well as creating new physical tables. Be aware that new physical tables
cannot be read until they are registered in metadata. For more information, see the
“METAOUT= Argument” in SAS Language Interfaces to Metadata.
If the METAOUT=ALL setting does not meet your business needs, but the data-level
authorizations do meet your business needs, you can pre-assign the library to use the
metadata engine in a configuration file. To do so, perform the following high-level steps:
1 Follow all the steps in “Stage 1: Flag the Library as Pre-assigned”. When you set the
pre-assignment type in step 4, select By external configuration.
2 Construct a LIBNAME statement that uses the metadata engine and your preferred
METAOUT= option. For an example, see Example Code 3.1.
3 Determine which autoexec file to use for the LIBNAME statement. For more
information, see “SAS Application Server Autoexec Files” on page 58.
The metadata engine can reference a library by the library name. For a library that is
registered in metadata with a name of Accounting tables and a libref of lib1, the
following LIBNAME statement accesses the tables with the metadata engine:
Example Code 3.1 Metadata LIBNAME Engine Statement
libname lib1 meta library="Accounting tables" metaout=datareg;
autoexec for the same server, the ORGOLD library is assigned using the LIBNAME
information from the autoexec file. Simply put, the library assignment in the autoexec file
always takes precedence.
1 Follow all the steps in “Stage 1: Flag the Library as Pre-assigned”. When you set the
pre-assignment type in step 4, select By external configuration.
3 Determine which autoexec file to use for the LIBNAME statement. For more
information, see “SAS Application Server Autoexec Files” on page 58.
n appserver_autoexec_usermods.sas
Use this file if you want all the SAS Application Server components registered to the
application server, such as an OLAP server, a workspace server, and so on, to
access the library with the same SAS engine.
n autoexec_usermods.sas
Use this file to modify one of the SAS Application Server components, such as the
workspace server, to use the engine specified in the LIBNAME statement, but to
leave the other server components unchanged. If this is your choice, then note that
the autoexec_usermods.sas file is located within a subdirectory, such as C:\SAS
\Config\Lev1\SASApp\WorkspaceServer\.
3 Assign the library using the engine specified in the library metadata.
For example, if the Orion Gold Customers library is pre-assigned, then the library
assignment is equivalent to a SAS programmer submitting a LIBNAME statement such
as the following:
LIBNAME ORGOLD BASE "D:\OrionStar\Gold";
In the case of an IOM server, such as the workspace server, you can verify the pre-
assignment of this library by the server process by enabling logging and observing the
note generated from the first GetMetadata method call in the server's log, as in the
following sample log:
60 Chapter 3 / Assigning Libraries
For non-IOM servers using the METAAUTORESOURCES option, a note like the
following is written to its log file:
NOTE: Libref ORGOLD successfully assigned from logical server.
For information about enabling the logging, see SAS Logging: Configuration and
Programming Reference.
The locked-down SAS server can access only specified directories and files. For
example, a user who connects to a locked-down workspace server from SAS Enterprise
Guide can access only those directories and files that are included in that server’s list of
permitted resources. Regardless of host-layer permissions, LIBNAME and FILENAME
statements that users submit through a locked-down server are rejected, unless the
target resource is included in the server’s lockdown paths list.
n stored process
n batch
n grid
n SAS/CONNECT
For more information about locked-down servers, see the SAS Intelligence Platform:
Security Administration Guide.
62 Chapter 3 / Assigning Libraries
63
4
Connecting to Common Data Sources
In order to perform the procedures for registering libraries, you must have
ReadMetadata and WriteMetadata permission for the repository and the SAS
Application Servers that the data library is assigned to. You must also have
WriteMemberMetadata permission for the folder into which the library and its tables are
registered.
68 Chapter 4 / Connecting to Common Data Sources
This chapter also explains the process that registers tables as metadata from the data
sources. Registering a table in metadata enables you to view the data in a SAS
application. For more information about managing table metadata, see Chapter 2,
“Managing Table Metadata,” on page 23.
Process Overview
This section provides generic instructions for using SAS Management Console to
configure access to a database. SAS/ACCESS must be licensed and configured before
using SAS Management Console to register the library that holds the tables. The
generic task has three stages:
The User Manager is a SAS Management Console plug-in that provides functions to
manage metadata definitions for users and user groups. Each user and user group that
accesses secure resources on a SAS Metadata Server must be represented by an
identity on the server. Individual users are represented by Person objects, and groups
are represented by Identity Group objects.
To define a user using SAS Management Console, perform the following steps:
2 From SAS Management Console navigation tree, right-click the User Manager icon.
Then select New User , which displays the New User Properties dialog box.
3 On the General tab, enter your name in the Name field. Note that you can enter any
user name that you want to use (for example, a single name, your full name, and so
on). Display Name, Job Title, and Description are optional.
4 Click the Accounts tab and click New to display the New Login Properties dialog
box.
5 Enter your Windows domain and user ID (WindowsDomain\user) and the password.
9 Click User Manager to verify that the name appears in the user name list.
The SAS Environment Manager Users module supports some of the user
administration tasks that are provided by the User Manager plug-in to SAS
Management Console, including the following:
n creation and maintenance of users, groups, and roles
n management of group and role memberships
n management of logins and internal accounts
For more information about the SAS Environment Manager Users module, see
“Managing User Access” in SAS Environment Manager Administration: User's Guide.
To define a user group using SAS Management Console, perform the following steps:
70 Chapter 4 / Connecting to Common Data Sources
2 From SAS Management Console navigation tree, right-click the User Manager icon.
Then select New Group, which displays the New User Properties dialog box.
3 Click the General tab, enter the group name in the Name field. Note that you can
enter any group name that you want to use. Display Name and Description are
optional.
4 Click the Groups and Roles tab and add the appropriate users and groups.
5 Click the Accounts tab and click New to display New Login Properties dialog box.
8 Click the Members tab and add all of the users that need to access this library. To
provide access for all registered users, give logon access to the SASUSERS group
by moving it from the Available Identities box to the Current Members box. Then
click OK.
9 Click User Manager to verify that the name appears in the user group name list.
The SAS Environment Manager Users module supports some of the user
administration tasks that are provided by the User Manager plug-in to SAS
Management Console, including the following:
n creation and maintenance of users, groups, and roles
n management of group and role memberships
n management of logins and internal accounts
For more information about the SAS Environment Manager Users module, see
“Managing User Access” in SAS Environment Manager Administration: User's Guide.
1 Right-click Server Manager and select the New Server option to access the New
Server wizard.
2 Select the database server type from the Database Servers list. Then, click Next.
6 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Select the database type from the Database Data list. Click Next.
4 Select an application server from the list, and use the right arrow to assign the
application server. This step makes the library available to the server and makes the
library visible to users of the server. Click Next.
5 Specify a libref on the library properties page. You can also click Advanced Options
to perform tasks such as pre-assignment. Pre-assigning a library is valuable if your
clients include SAS Enterprise Guide or SAS Add-In for Microsoft Office. Some SAS
72 Chapter 4 / Connecting to Common Data Sources
solutions require that libraries accessed from their client applications be pre-
assigned (check the documentation for your specific solution for details). For more
information, see Chapter 3, “Assigning Libraries,” on page 43. Click Next to access
the next page of the wizard.
6 On the server and connection page, select the database server from the previous
stage. Contact your database administrator if you are unsure of the correct value for
the schema field. Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings. At this point, register tables as
explained in “Registering and Verifying Tables” on page 171.
SAS Data
Workspace Server
Integration Studio
After you have installed the required SAS software, you need to set up a connection
from a SAS server to a SAS data set. This connection requires that you register the
Base SAS library with the SAS Metadata Server. In addition, you must import any user-
defined formats that have been created for the data set in order to view or operate on
the data. Assume that the SAS software has already been loaded by using the standard
installation wizard and that the data set is stored in a location that can be accessed.
Register the library by using SAS Management Console or SAS Environment Manager.
This metadata enables your SAS applications to access the data sets that you need to
work with. For this example, the data set contains information about customers of the
Orion Gold enterprise.
2 Select Base SAS Library from the SAS Data list. Click Next.
74 Chapter 4 / Connecting to Common Data Sources
3 Enter an appropriate library name in the Name field (for example, Orion Gold
Customers). Note that you can supply an optional description if you want. Click Next.
4 Select the appropriate server from the Available servers list and move it to the
Selected servers list. For this example, use SASApp. Click Next.
Libref ORGOLD
Engine BASE
Path Specification Select from the Available items or click New to enter
a path (for example, C:\SAS\Config\Lev1\SASApp
\Data). (Enter the fully qualified path to the library.
This path is specified differently in different operating
systems. Make sure that the appropriate path is
displayed in the Selected items field.)
You can also click Advanced Options to perform tasks such as pre-assignment and
setting host-specific and LIBNAME options. Click Next to access the next page of
the wizard.
6 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
At this point, register tables as explained in “Registering and Verifying Tables” on page
171. If registering tables fails, check that the user account has host access permission
to the path.
2 Click the Side Menu icon in the upper left corner of the window.
3 Click Libraries.
5 Enter a library Name (for example, Orion Gold). The name cannot contain a
forward slash or a backslash. If necessary, change the Location. Click SAS Base
Library. The Options dialog box appears.
Libref Enter an identifier of your choice (for example, OrGold). The libref
name cannot contain spaces. The first character must be a letter or an
underscore and all other characters can be either letters, underscore,
or numbers.
Engine Click the down arrow at the right of the field. From the resulting drop-
down list, select an engine. For this example, the value (Base) is the
engine name.
Specify the For this example, select the /install/data/SAS check box.
path to the
library
Click OK.
7 Examine the page to ensure that the proper values have been entered. Enter the
Description. Click the Save icon to save the new library.
76 Chapter 4 / Connecting to Common Data Sources
To make a format catalog available using the alternative method on Windows and UNIX
systems, perform the following steps:
2 Then, use the FMTSEARCH system option in the same SAS configuration file to
point to the format catalog:
Establishing Connectivity to a Library of SAS Data Sets 77
Note: On UNIX systems, you must enter the environment variable name in
uppercase. For example, you enter FMTLIB1 instead of fmtlib1.
To make a format catalog available using the alternative method on z/OS systems,
perform the following steps:
1 Add the AUTOEXEC system option to the SAS launch command as shown in the
following example:
SAS-configuration-directory/Lev1/SASApp/startsas.sh
o("autoexec="./WorkspaceServer/userfmt.sas"")
In this example, startsas.sh is your SAS launch command script, and userfmt.sas
is the name of the SAS autoexec file. When you enter the command, you must enter
it all on one line.
2 In the autoexec file, use the LIBNAME statement to assign the format library and the
OPTIONS statement to set the FMTSEARCH system option. For example, you
might specify the following statements:
LIBNAME fmtlib1
'SAS-configuration-directory/Lev1/Data/orformat';
options fmtsearch=(fmtlib1.orionfmt);
78 Chapter 4 / Connecting to Common Data Sources
SAS/SHARE
Base SAS Engine
REMOTE Engine
Library of
SAS Data Sets
This access can be extended through the use of the SAS/SHARE server. A
SAS/SHARE server permits multiple users to update the same items in a SAS library.
You can share access to a library of existing SAS data sets by using a SAS/SHARE
server to manage access to the data. Assume that the SAS/SHARE software has
already been loaded by using the standard installation wizard, and that you have
registered a SAS/SHARE server in metadata (for example, SHAREServer) that was
created by the wizard. Configuring shared access is a two-stage process:
Establishing Shared Access to SAS Data Sets 79
2 While creating the SAS/SHARE REMOTE Engine Library, choose the option to
register a new library to the SAS/SHARE server. This is shown in the previous figure
as a Base SAS library. It is very important to pre-assign this library and to assign it to
the SAS/SHARE server.
2 Select SAS/SHARE REMOTE Engine Library from the SAS Data list. Click Next.
4 Select the appropriate server from the Available servers list and move it to the
Selected servers list. For this example, use SASApp. Click Next.
SAS/SHARE Server Library Click New to register a new library such as a Base
SAS library. Assign the new library to the
SAS/SHARE Server and set the library as pre-
assigned.
80 Chapter 4 / Connecting to Common Data Sources
Connection
Click Next.
7 Examine the final page of the wizard (for the SAS/SHARE REMOTE Engine Library)
to ensure that the proper values have been entered. Click Finish to save the wizard
settings.
At this point, register tables as explained in “Registering and Verifying Tables” on page
171.
2 Click the Side Menu icon in the upper left corner of the window.
3 Click Libraries.
Libref Enter an identifier of your choice (for example, ShareLib). The libref
name cannot contain spaces. The first character must be a letter or an
underscore and all other characters can be either letters, underscore,
or numbers.
Engine Click the down arrow at the right of the field. From the resulting drop-
down list, select an engine. For this example, the value (Base) is the
engine name.
Specify the For this example, select the /install/data/SAS check box.
path to the
library
Click OK.
7 Examine the page to ensure that the proper values have been entered. Enter the
Description. Click the Save icon to save the new library.
SAS Data
Workspace Server
Integration Studio
The Excel file must be stored in a location that can be accessed by a Windows
machine. This example focuses on a file that is local to a SAS server, but a Windows
UNC path such as \\datasrv\sales\firstquarter.xls is also acceptable.
2 Select Microsoft Excel Library from the Database Data list. Click Next.
5 Select the appropriate server from the Available servers list and move it to the
Selected servers list. For this example, use SASApp. Click Next.
6 On the server and connection page, click New in the Server Details group box to
specify a new database server.
Establishing Connectivity to a Flat File 83
9 On the Connection Properties page, enter the path to the Excel file. Enclose the
value in quotation marks (for example, "C:\sales\firstquarter.xls"). Click Next.
10 Examine the final page of the New Server wizard to ensure that the proper values
have been entered. Click Finish to save the server settings.
The New Server wizard closes and returns you to the final page of the New Library
wizard.
11 Examine the final page of the New Library wizard to ensure that the proper values
have been entered. Click Finish to save the library settings.
At this point, register tables as explained in “Registering and Verifying Tables” on
page 171.
The Microsoft Excel Library wizard in SAS Management Console generates the
metadata to construct a LIBNAME statement for the EXCEL LIBNAME engine. For
more information about the EXCEL LIBNAME engine and supported options, see the
SAS/ACCESS Interface to PC Files: Reference.
SAS Data
Workspace Server
Integration Studio
You can connect to a flat file using the External File Source Designer in SAS Data
Integration Studio.
Assume that the SAS software has already been loaded by using the standard
installation wizard, and that the flat file is stored in a location that can be accessed. This
example focuses on a comma-delimited flat file. A similar process is used for other
types of flat files, but some steps are different.
1 Open SAS Data Integration Studio. Then, select File New External File
Delimited to access the New Delimited External File wizard.
3 Enter the fully qualified path to the file in the File name field (for example, SAS-
configuration-directory\sources\customer_data.dat). Click Next.
4 On the Delimiters and Parameters page of the wizard, deselect the Blank option in
the Delimiters group box. Then, select the Comma option. Click Next to access the
Column Definitions page of the wizard.
a Click Refresh to view the data from the flat file in the File tab in the view pane at
the bottom of the page.
b Click Auto Fill to access the Auto Fill Columns dialog box. Change the value
entered in the Start record field in the Guessing records group box to 2. This
setting is based on the assumption that the first data record of the flat file
contains header information and that the record is unique because it holds the
column names for the file. Therefore, excluding the first data record from the
guessing process yields more accurate preliminary data because it is excluded
when the guessing algorithm is run.
6 Click Import to access the Import Column Definitions dialog box. The following four
methods are provided for importing column definitions:
n Get the column definitions from other existing tables or external files.
n Get the column definitions from a format file.
n Get column definitions from a COBOL format file.
n Get the column names from column headings in the file.
In most cases, you get the column definitions from an external format file or from the
column headings in the external file. Here is an example of a format file:
# Header follows
Name,SASColumnType,SASColumnName,SASColumnLength,SASInformat,SASFormat,Desc,ReadFlag
# Column definition records records follow
Make,C,Make,13,,$char13.,Manufacturer name column,y
Model,C,Model,40,,$char40.,Model name column,y
# Comma within quotation marks below is not a delimiter
Description,C,Description,32,$char32.,,'Description, Comments, Remarks',y
For this example, select the Get the column names from column headings in the
file radio button. Keep the default settings for the fields underneath it.
Note: If you select Get the column names from column headings in the file, the
value in the Starting record field in the Data tab of the view pane in the Column
Definitions dialog box is automatically changed. The new value is one greater than
the value in the The column headings are in file record field in the Import Column
Definitions dialog box.
8 The preliminary data for the external file object is displayed in the columns table at
the top of the page. The Informat and Format columns for the rows in the table are
based on the values that are included in the sample data that is processed by the
guessing function. The results are accurate for this particular set of records, but you
should still examine them to make sure that they are representative of the data in the
rest of the flat file. Edit the values by clicking directly on the cells in the column table
and making the necessary changes.
9 Click the Data tab at the bottom of the Column Definitions page. Then, click
Refresh. The data should be properly formatted. If not, edit the cells in the column
table and check the results by refreshing the Data tab. You can repeat this process
until you are satisfied. You can review the SAS log for more details.
Note: To view the code that is generated for the external file, click the Source tab.
To view the SAS log for the generated code, click the Log tab. The code that is
displayed in the Source tab is the code that is generated for the current external file.
10 Click Next.
Establishing Connectivity to XML Data 87
11 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings. The file is ready for use.
SAS Data
Workspace Server
Integration Studio
The following steps describe how to specify a SAS XML library in SAS Management
Console. Assume that the XML library points to an XML file that contains climate
information (climate.xml). The XML file is in generic format, as defined for the SAS
XML LIBNAME engine. For more information, see the SAS XML LIBNAME Engine:
User's Guide.
To register an XML library, perform the following steps:
2 Select SAS XML library from the SAS Data list. Click Next.
88 Chapter 4 / Connecting to Common Data Sources
3 Enter an appropriate library name in the Name field (for example, XML Lib). Click
Next.
4 Select the appropriate server from the Available servers list and move it to the
Selected servers list. For this example, use SASApp. Click Next.
Libref xmllib
Engine XML
Click Next.
6 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
can also be used as the data source for other information maps. For more information
about creating information maps, see either the SAS Information Map Studio Help or
Base SAS Guide to Information Maps. Information map tables are expected to be used
primarily by SAS Information Map Studio.
SAS Information
Workspace Server
Map Studio
Information Maps
Metadata Server
LIBNAME Engine
Information Maps
2 Select SAS Information Map Library from the SAS Data list. Click Next.
3 Enter an appropriate library name in the Name field (for example, InfoMapLib). Click
Next.
4 Select the appropriate server from the Available servers list and move it to the
Selected servers list. For this example, use SASApp. Click Next.
Libref maplib
90 Chapter 4 / Connecting to Common Data Sources
Engine SASIOIME
Click Next.
6 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings. At this point, register tables as
explained in “Registering and Verifying Tables” on page 171.
Studio. Selecting the Use the detail values from the data source radio button is
equivalent to setting the AGGREGATE= option to NO, and selecting the Use the
aggregated values from the data source radio button is equivalent to setting the
AGGREGATE= option to YES. This setting overrides the aggregation settings on the
library or the table.
n When referenced by an information map table, measure data items that reference
other measure data items or that use aggregate functions in their expressions can
produce aggregated values only. If a source information map contains one of these
data items, then set the AGGREGATE= option to YES on the library. Otherwise,
these data items are not registered as columns when you register the information
map as a table.
n If the source information map for an information map table has measure data items
that reference other measure data items or that use aggregate functions in their
expressions, then the combination of setting the AGGREGATE= option to YES on
the library and setting the AGGREGATE= option to NO on the table or on the data
source (within SAS Information Map Studio) causes the table data to be
inaccessible.
n Normally, when an information map table is registered, its columns get their formats
from the associated source data items. However, when a source data item is a
measure data item and has a data type of character, then if the AGGREGATE=
option is set to NO on the library, the format is not set to the format of the source
data item. The format is set to the format of the column that the source data item is
based on.
n Because an information map acts as a reference to underlying data, ReadMetadata
permission must be granted to a user for the information map table, the source
information map, and the table used by the source information map. Read
permission is also needed on the source information map.
n Stored processes and prefilters associated with a source information map are
applied to the information map table. (Filters that are not used as prefilters are not
applied.)
n If a stored process is associated with a source information map and the stored
process uses prompts with default values, the stored process is applied to the
92 Chapter 4 / Connecting to Common Data Sources
information map table. If the prompts do not have default values, the stored process
does not affect the information map table.
n Information maps created from OLAP cubes cannot be registered as information
map tables.
n The source information map name must be 32 bytes or less.
SAS Data
Workspace Server
Integration Studio
ODBC Driver
Database Tables
Manager
ODBC Driver
Prerequisites
The following prerequisites are necessary before you can define an ODBC library in
SAS Management Console.
n Make sure that “Login as batch” user rights are assigned for your user ID (entered in
the WindowsDomain\user). For details about assigning user rights, see your
Windows operating system documentation.
n SAS/ACCESS Interface to ODBC and the ODBC driver for the Microsoft SQL Server
must be installed and configured on the same machine where your SAS System
runs.
Setting up a connection from SAS to an ODBC data source using Microsoft Windows
NT authentication is a five-stage process.
3 Register a user.
2 In the Control Panel window, select System and Security Administrative Tools
Data Sources (ODBC) to open the ODBC Data Source Administrator dialog box.
3 Click the System DSN tab. On that tab, click Add to open the Create New Data
Source dialog box.
4 Select SQL Server in the Create New Data Source dialog box.
5 Click Finish, and the Create a New Data Source to SQL Server dialog box appears.
Enter the name of your data source and the name of your server. This example uses
the values SqlServerNT and BLUEFIN, respectively.
At this point, you should click Test Data Source to run a test connection and ensure
that your configuration is valid. If the test is successful, the Test Results page is
displayed.
9 Click OK to exit.
10 Click OK again to exit the ODBC Data Source Administrator dialog box.
2 Submit a LIBNAME statement that contains the ODBC engine in the SAS Enhanced
Editor. The LIBNAME statement should be similar to the following:
3 After you submit this LIBNAME statement, make sure that you can see your SQL
Server tables in the SAS Explorer window. You can also submit a DATASETS
procedure similar to the following to display the tables in the SAS log:
96 Chapter 4 / Connecting to Common Data Sources
The previous steps confirm that the ODBC data source was created correctly and that
you can access the tables in the Microsoft SQL Server. If another user has trouble
accessing the tables from the registered library (described in the following stages), then
ask the user to try these steps or request assistance from your Windows administrator.
2 Right-click User Manager in the left pane. Select New User. This selection opens
the New User Properties dialog box.
3 Click the General tab in the New User Properties dialog box, and add the user name
in the Name text box. Display Name, Job Title, and Description are optional.
4 Click the Accounts tab. Click New to open the New Login Properties dialog box.
5 Add the Windows user ID (in the form WindowsDomain\user) and password in the
New Login Properties dialog box. Click OK. The user ID and password appear in the
New Users Properties dialog box.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
2 Select New Server from the menu. This selection invokes the New Server wizard.
Establishing Connectivity to an ODBC Database Using Microsoft Windows NT Authentication
97
3 Select ODBC Server from the Database Servers list in the New Server wizard.
4 Click Next. Specify a name for the new ODBC server, such as
sql_server_ntauth. The Description field is optional.
5 Click Next to continue to the next page, which lists the default property values for
the server.
Note: Do not change these default values. Just click Next to continue to the next
page in the wizard.
Table 4.5 Server Properties
6 Click Next.
Note: The value for the DSN= parameter is the name of the ODBC-system data
source that you set up in stage 1.
Select None for Authentication type. Select DefautAuth for the Authentication
domain.
Note: If you do not want to create a data source name, you can connect without
using the DSN= parameter. Instead, submit the following LIBNAME statement:
In this case, you enter the following as the connection string in the Connection
String text box:
'server=bluefin.your-domain.com;driver=sql server;
Trusted Connection=yes'
8 Click Next.
9 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Right-click Libraries and select New Library to open the New Library wizard.
3 Select ODBC Library from the Database Data list. Click Next.
4 Specify a name for your library (for example, sql_server_ntauth) Click the
Browse button by Location to select the metadata folder location.
5 Click Next. Select the appropriate server from the Available servers list and move it
to the Selected servers list. For this example, use SASApp.
6 Click Next.
Libref Odbclib
Engine ODBC
100 Chapter 4 / Connecting to Common Data Sources
8 Click Next.
9 Specify the schema name (DBO) and the database server (sql_server_ntauth).
10 Click Next.
11 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
At this point, your library is defined. However, to access data, you might need to perform
extra steps (for example, pre-assigning the library or registering tables). See
“Registering and Verifying Tables” on page 171.
SAS Data
Workspace Server
Integration Studio
SAS/ACCESS
Database Server
Interface to OLE DB
OLE DB
Data Provider
This section explains how to define an OLE DB library in SAS Management Console in
order to access the Microsoft SQL Server using Microsoft Windows NT authentication.
Prerequisites
The following prerequisites are necessary before you begin defining an OLE DB library:
n Make sure that “Login as batch” rights are assigned for your user ID (entered in the
WindowsDomain\user). For details about assigning user rights, see your Windows
operating system documentation.
n SAS/ACCESS Interface to OLE DB and the OLE DB provider for the Microsoft SQL
Server must be installed on the same machine where SAS runs.
n Before you configure the library in SAS Management Console, make sure that you
can submit a LIBNAME statement successfully. Here is an example of a LIBNAME
statement:
Note: If you cannot see SQL Server tables in the SAS Explorer window, then you
need to submit the following SQL procedure to find the table names and the
corresponding schema for each table.
proc sql;
connect to oledb;
select table_name, table_schema from connection
to oledb(OLEDB::Tables);
quit;
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
3 Verify that the SQL Server tables are listed in the SAS Explorer.
1 From the navigation tree, right-click Server Manager and select the New Server
option to access the New Server wizard.
3 Click Next.
Note: The Associated Machine property refers to the SAS Application Server - not
the SQL Server machine.
6 Click Next.
7 Enter the server name "bluefin.na.sas.com" (in quotation marks) for the SQL
Server in the Datasource field. Enter the Provider.
Table 4.8 Connection Properties
OLE DB Connection
Information Options
104 Chapter 4 / Connecting to Common Data Sources
Click the OLE DB Connection Information Options button to display the OLE DB
Connection Information Options dialog box.
8 Enter the following text In the Init String field. Enter the entire string in quotation
marks (" "), all on one line.
"Provider=SQLOLEDB.1;
Integrated Security=SSPI;
Persist Security Info=True;
Initial Catalog=Northwind;
Establishing Connectivity to an OLE DB Database Using Microsoft Windows NT
Authentication 105
Data Source=bluefin.na.sas.com"
9 Click OK.
11 Click Next.
12 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Under Data Library Manager, right-click Libraries and select New Library to start
the New Library wizard.
3 In the wizard, expand the Libraries Database Data folder and select OLE DB
Library. Click Next.
5 Click Next.
6 Select the appropriate server from the Available servers list and move it to the
Selected servers list on the right. For this example, use SASApp. Click Next.
7 Enter the libref name (for example, SqlOledb) in the Libref field.
106 Chapter 4 / Connecting to Common Data Sources
Libref SqlOledb
Engine OLEDB
8 Click Next.
Note: This is the same database schema name specified in the LIBNAME
statement:
Note that the database schema name must be uppercase in the LIBNAME
statement.
Table 4.10 Server and Connection Information
Database Schema Name Enter DBO from the LIBNAME statement example.
Click Next.
10 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings. The new library
(sqlserver_oledb_ntauth_lib) appears in the list of libraries.
1 Close SAS Management Console and restart it using the same Windows ID
(WindowsDomain\user) that you previously used.
2 From the navigation tree in SAS Management Console, right-click Data Library
Manager.
3 Under Data Library Manager, right-click the library that you just created
(sqlserver_oledb_ntauth_lib) and select Display LIBNAME Statement. The
Display LIBNAME Statement message window appears with the LIBNAME
statement that is generated for your server.
4 Copy the LIBNAME statement from the Display LIBNAME Statement window and
paste it into your SAS Program Editor.
5 Submit the LIBNAME statement and verify that the appropriate tables are listed in
the SAS Explorer window.
3 In the SAS Library field, click the down arrow at the right of the field. From the
resulting drop-down list, select your application server (SASApp, in this example),
and click Next.
4 Click Next again, and the Define Tables dialog box is displayed with a list of SQL
Server tables.
5 In the list, click the table name for which you want to import metadata.
6 Click Next, and the application displays the table that you selected.
7 Click Finish, and you are able to use the specified table in any SAS BI client.
SAS Data
Workspace Server
Integration Studio
SAS/ACCESS
Teradata Server
Interface to Teradata
Teradata Client
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
1 Right-click the Server Manager and select New Server from the menu. This
selection invokes the New Server wizard.
110 Chapter 4 / Connecting to Common Data Sources
2 Select Teradata Server (under Database Servers) in the New Server wizard. Then
click Next.
3 Specify a name for the new Teradata server. The Description is optional.
4 Click Next to continue. This page lists default server properties. Do not change
these default values.
Table 4.11 Server Properties
5 Click Next to continue. On this page, enter the Teradata connection properties for
your Teradata database.
Table 4.12 Connection Properties
Account number Specify the account number that you want to charge
for the Teradata session. Note: This property is
optional.
Establishing Connectivity to a Teradata Database 111
Authentication Domain Specify the domain (in this example, Teraauth) that
is used to authenticate logon attempts to the
Teradata server. (You might need to create a new
authentication domain. For more information, see
“How to Store Passwords for a Third-Party Server” in
SAS Intelligence Platform: Security Administration
Guide.) Click New to access the New Authentication
Domain dialog box. Then enter the appropriate value
in the Name field and click OK to save the setting.
6 Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
After you assign the LIBNAME statement, you can view your Teradata tables in the
TeraLib library either by viewing it from the SAS Explorer window or by submitting a
DATASETS procedure that is similar to the following:
Add the Teradata library using SAS Management Console Data Library Manager plug-
in.
2 Right-click Libraries and select New Library from the menu to open the New
Library wizard.
3 Under Database Data, select Teradata Library. Then click Next to continue to the
next page of the wizard.
4 Enter a name for your library (for example, TeraLibrary) in the Name field. In the
Location field, select the folder (known as the metadata folder) in which to save this
library.
Using a metadata folder to organize library and table objects in metadata (or any
other metadata content that is supported by folders) is an efficient way to control
access to those objects. Library and table objects inherit permissions from their
respective metadata folders. Controlling access to these objects through permission
inheritance is much easier when the objects are stored in the same metadata folder.
You control access to the libraries and tables by denying ReadMetadata permission
to the folder in which the library and tables are stored.
For more details about metadata folders, see “Working with SAS Folders” in SAS
Intelligence Platform: System Administration Guide.
6 Select the appropriate server from the Available servers list and move it to the
Selected servers list on the right. Note that even though the wizard states that this
step is optional, you must select the server. For this example, use SASApp.
7 Click Next to continue to the next page of the wizard. In the Libref field, enter your
libref (for example, TeraLib).
Establishing Connectivity to a Teradata Database 113
Libref TeraLib
Engine TERADATA
8 Click Next to move to the server and connection information page. Select the
Teradata server that you created.
Table 4.14 Server and Connection Information
Database Schema Name See your database administrator for the correct
value. This is optional.
9 Click Next. Examine the final page of the wizard to ensure that the proper values
have been entered. Click Finish to save the wizard settings.
At this point, your library is defined. However, to access data, you either need to register
the tables or pre-assign the library. See “Registering and Verifying Tables” on page
171.
114 Chapter 4 / Connecting to Common Data Sources
SAS Data
Workspace Server
Integration Studio
SAS/ACCESS
Oracle Server
Interface to Oracle
Oracle Client
This example shows the process for establishing a SAS connection to an Oracle
database. It assumes that the software for the database has already been loaded by
using the standard installation wizard for the database client.
Prerequisites
The following prerequisites are necessary before you begin defining an Oracle library:
n installation of SAS/ACCESS Interface to Oracle. For configuration information, see
the Install Center at http://support.sas.com/documentation/installcenter/94 and use
the operating system and SAS version to locate the appropriate SAS Foundation
Configuration Guide.
Establishing Connectivity to an Oracle Database 115
Make sure you are able to see Oracle tables in the SAS Explorer window.
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
Setting up a connection from SAS to a database management system is a two-stage
process.
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select Oracle Server from the Database Servers list. Then, click Next.
116 Chapter 4 / Connecting to Common Data Sources
5 The server properties that are displayed in the window are default values and should
not be changed. To change the Associated Machine property, click the down arrow
at the right of the field and select the appropriate server from the drop-down list.
Table 4.15 Server Properties
Software Version
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Select Oracle Library from the Database Data list. Click Next.
4 Select a SAS server from the list and use the right arrow to assign the SAS server.
This step makes the library available to the server and makes the library visible to
users of the server. This step is optional. Click Next.
Libref ORAREF
118 Chapter 4 / Connecting to Common Data Sources
Engine ORACLE
You can also click Advanced Options to perform tasks such as pre-assignment and
optimization. Click Next to access the next page of the wizard.
Database Schema Name See your database administrator for the correct
value.
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings. At this point, register tables as
explained in “Registering and Verifying Tables” on page 171.
Establishing Connectivity to a Microsoft Access Database By Using ODBC 119
SAS Data
Workspace Server
Integration Studio
ODBC Driver
Database Tables
Manager
ODBC Driver
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
This example shows the process for establishing a SAS connection to an Access
database. It assumes that the software for the database has already been loaded with
the standard installation wizard for the database client. In addition, SAS/ACCESS
Interface to ODBC must be installed on the SAS server that accesses the Access
database.
1 Open the Windows Control Panel. Click Systems and Security Administrative
Tools Data Sources (ODBC) to access the ODBC Data Source Administrator
dialog box.
2 Click Add to access the Create New Data Source dialog box. Click the Microsoft
Access driver listed in the window (for example, Microsoft Access Driver [*.mdb]).
Click Finish to access the ODBC Microsoft Access Setup dialog box.
Note: System data sources and user data sources store information about how to
connect to the indicated data provider. A system data source is visible to all users
with access to the system, including Windows services. A user data source is visible
only to a particular user, and it can be used on the current machine only.
4 Click OK to save the configuration settings and return to the ODBC Data Source
Administrator dialog box. Then, click OK to save the data source.
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select ODBC Server from the Database Servers list. Click Next.
4 Enter an appropriate server name in the Name field (for example, MS Access
Server). One server is required for each DSN. Note that you can supply an optional
description if you want. Click Next.
Vendor Microsoft
Click Next.
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
Establishing Connectivity to a Microsoft Access Database By Using ODBC 123
2 Select ODBC Library from the Database Data list. Click Next.
3 Enter an appropriate library name in the Name field (for example, MS Access
Library). Note that you can supply an optional description if you want. Click Next.
4 Select an application server from the list and use the right arrow to assign the
application server. Click Next.
Libref ACCESREF
Engine ODBC
You can also click Advanced Options to perform tasks such as pre-assignment and
optimization. Click Next to access the next page of the wizard.
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings. At this point, register tables as
explained in “Registering and Verifying Tables” on page 171.
Data Sources
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
Establishing Connectivity to a SAS Federation Server 125
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
After defining a user or user group, setting up a connection from a SAS session to a
SAS Federation Server is a two-stage process:
If you do not know the DSN or connection string to use for accessing the data, then
contact the server administrator for that information.
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select SAS Federation Server from the SAS Servers list. Click Next.
4 Enter an appropriate server name in the Name field (for example, Federation
Server). Note that you can supply an optional description if you want. Click Next.
Click Next.
Click Next.
Host name Specify the host name for the SAS Federation
Server.
Click Next.
8 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Select SAS Federation Server Library from the SAS Data list. Click Next.
3 Enter an appropriate library name in the Name field (for example, Federated Data
Library). Click Browse and select a metadata folder location for the library. Note
that you can supply an optional description if you want.
Click Next.
4 Select an application server from the list and use the right arrow to assign the
application server.
Click Next.
Libref FEDREF
Engine FEDSVR
Identify Connection Information Select the radio button for Data Source Name and
specify the DSN.
If you prefer to specify a connection string, then
select the radio button for Connection String. For
information about SAS Federation Server connection
strings, see SAS Federation Server: Administrator's
Guide.
You can also click Advanced Options to perform tasks such as pre-assignment and
optimization. Click Next to access the next page of the wizard.
Database Schema Name See your administrator for the correct value.
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings. At this point, register tables as
explained in “Registering and Verifying Tables” on page 171.
For more information about how the LIBNAME engine for SAS Federation Server
supports access to one data source at a time, see “Data Source Connection” in SAS
LIBNAME Engine for SAS Federation Server: User's Guide.
Establishing Connectivity to a SAS Scalable Performance Data Server 129
SAS Data
Workspace Server
Integration Studio
SAS Scalable
SPDS Engine Performance Data
Server
SPDS Tables
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
After defining a user or user group, configuring a connection from SAS to an SPD
Server is a three-stage process:
This example shows the process for establishing a SAS connection to SPD Server. It
assumes that the software for the database has already been loaded by using the
standard installation wizard for the database client. The SPD Server client and server
software must be installed before the connection can be established.
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select SAS Scalable Performance Data Server from the SAS Servers list. Then,
click Next.
4 Enter an appropriate server name in the Name field (for example, SPDServer). You
can supply an optional description. Click Next.
Click Next.
Host D1234
Port Number or Name 5200 (Enter the port number for the SPD Server
name server.)
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Select SAS Scalable Performance Data Server Library from the SAS Data list.
Click Next.
4 Select a SAS server from the list and use the right arrow to assign the SAS server.
This step makes the library available to the server and makes the library visible to
users of the server. Click Next.
Libref spdsrv
Engine SASSPDS
You can also click Advanced Options to perform tasks such as pre-assignment and
optimization. Click Next to access the next page of the wizard.
SAS SPD Server SPDSServer (Use the database server that you
selected in the New Server wizard.)
LIBNAME Domain spdsrv (Select the domain name that you entered in
the libname.parms file.)
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings.
At this point, register tables as explained in “Registering and Verifying Tables” on page
171.
134 Chapter 4 / Connecting to Common Data Sources
SAS Data
Workspace Server
Integration Studio
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
This example shows the process for establishing a SAS connection to SAP. It assumes
that the following software has already been loaded by using the standard installation
wizard:
n SAP RFC library. This is required for communication with SAP.
n SAS/ACCESS Interface to R/3. For z/OS hosts, this installs the SAS RFC server.
For these z/OS hosts, this server must be started each time you start the SAS
servers such as the Object Spawner.
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select SAP Server from the Enterprise Applications Servers list. Then, click Next.
4 Enter an appropriate server name in the Name field (for example, SAPServer). Note
that you can supply an optional description if you want. Click Next.
5 Enter the following server properties. An SAP 4.6 installation is used as the
example:
Table 4.32 Server Properties
Vendor SAP AG
136 Chapter 4 / Connecting to Common Data Sources
Click Next.
Note: An embedded RFC server is not available for z/OS. For z/OS, click the
Advanced Options button and enter “host=rfc-server port=rfc-port” in the Other
option(s) to be appended text field. Also, select the Batch Mode check box.
7 Select Application Server and click Options to access the Application Server Host
dialog box.
TIP Instead of the application server, you might choose other options, as well,
including: SAPGUI Logical Name, SAPRFC.INI Logical Name, and Message
Servers
8 Enter the fully qualified name of the server host that was supplied by the SAP
administrator (for example, sapsrv.na.sas.com) in the Application Server Host
field. Enter the system number that was supplied by the SAP administrator (for
example, 12) in the System Number field. The default access mode is direct
access. In order to run in batch mode, click the Advanced Options tab. Select the
Batch Mode check box. In the Other options field, enter a value for destgroup
Establishing Connectivity to an SAP Server 137
9 Click Next.
10 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Select SAP Library from the Enterprise Applications Data list. Click Next.
3 Enter an appropriate library name in the Name field (for example, SAP Library).
You can supply an optional description. Click Next.
4 Select an application server from the list and use the right arrow to assign the
application server. This step makes the library available to the server and makes the
library visible to users of the server. Click Next.
Libref SAPLib
Click Next.
138 Chapter 4 / Connecting to Common Data Sources
6 Select the SAP server that you entered in the Name field of the New Server wizard
(for example, SAP Server) by using the Database Server drop-down list. Then, click
Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings.
The tools for extracting the SAP metadata are provided as a plug-in to SAS
Management Console and access to the tool is controlled with role-based access. To
enable the extraction tool for role-based access and to extract the SAP metadata,
perform the following steps:
2 On the Plug-in Manager window, select the ExtractionTool check box. Click OK.
3 Assign the ExtractionTool capability to a role with the User Manager plug-in to SAS
Management Console, and then associate users or groups with the role. The
following list provides two choices:
n Assign the ExtractionTool capability to an existing role such as Management
Console: Advanced.
n Create a new role, assign the ExtractTool capability to it, and then associate
users and groups with the new role.
For more information about roles, see “Change a Role's Capabilities” in SAS
Management Console: Guide to Users and Permissions.
Establishing Connectivity to an SAP HANA Server 139
4 Important: Log on to SAS Management Console with an account that has access to
the Foundation repository and that is not an unrestricted account.
5 Select Tools Extract from BW or Tools Extract from R/3. For information
about using the tools, click Help.
SAS Data
Workspace Server
Integration Studio
SAS/ACCESS
Interface to SAP HANA
SAP HANA Server
ODBC Driver
Database Tables
Manager
ODBC Driver
for SAP HANA
This example does not specify a DSN style. SERVER=, DATABASE=, USER=, and
PASSWORD= are connection options. This is the default method, which is
recommended.
libname A1 sasiohna server=mysrv1 port=30015 user=myusr1 password='mypwd1';
After you assign the LIBNAME statement, you can view your SAP HANA tables in the
A1 library either by viewing it from the SAS Explorer window or by submitting a
DATASETS procedure that is similar to the following:
proc datasets lib=A1;
quit;
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
Establishing Connectivity to an SAP HANA Server 141
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
This example shows the process for establishing a SAS connection to an SAP HANA
data source. It assumes that SAS/ACCESS Interface to SAP HANA software has
already been installed.
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select SAP HANA Server from the Database Servers list. Then, click Next.
4 Click Next. Select the appropriate server from the Available servers list and move it
to the Selected servers list. For this example, use SASApp.
5 Enter the following server properties. An SAPHANA 1.0 installation is used as the
example:
Table 4.35 Server Properties
Vendor SAP AG
Click Next.
Server Information You are required to select at least one field. Enter the
ODBC Datasource appropriate information if you choose ODBC
Datasource or Connection String. If you choose
Connection String Server Information, then click Options. See Server
Information Options on page 143.
Enter the connection information for your SAP HANA
instance. There are several ways of specifying the
connection information. In the Server information
window, you can specify server and port, or the
server and instance information. Or you can enter the
ODBC data source, or a connection string. Click OK.
Enter mysvr1 in the Server field. The Driver field is optional. Click OK.
7 Click Next.
8 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Select SAP HANA Library from the Database Data list. Click Next.
3 Enter an appropriate library name in the Name field (for example, SAP HANA
Library). You can supply an optional description. Click Next.
4 Select an application server from the list and use the right arrow to assign the
application server. This step makes the library available to the server and makes the
library visible to users of the server. Click Next.
144 Chapter 4 / Connecting to Common Data Sources
Libref SHLibref
Click Next.
6 Select the SAP HANA server that you entered in the Name field of the New Server
wizard (for example, SAS HANA Server) by using the Database Server drop-down
list. Then, click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings.
SAS Data
Workspace Server
Integration Studio
SAS/ACCESS
Impala Server
Interface to Impala
Impala Client
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
Setting up a connection from SAS to an Impala Server is a two-stage process:
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select Impala Server from the Database Servers list. Then, click Next.
4 Specify a name for the new Impala server. The Description is optional.
146 Chapter 4 / Connecting to Common Data Sources
5 Enter the following server properties. An Impala 1.0 installation is used as the
example:
Table 4.38 Server Properties
Click Next.
6 On this page, enter the connection properties. Click the Server Information button.
Click Options. For this example, enter the following connection properties:
Click OK.
Table 4.39 Connection Properties
Server Information:
ODBC datasource Information:
Establishing Connectivity to an Impala Server 147
7 Click Next.
8 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Select Impala Library from the Database Data list. Click Next.
3 Enter an appropriate library name in the Name field (for example, Impala Library).
You can supply an optional description. Enter the Location if different from the
default. Click Next.
4 Select an application server from the list and use the right arrow to assign the
application server. This step makes the library available to the server and makes the
library visible to users of the server. Click Next.
Libref ImpLib
Click Next.
6 Select the Impala server that you entered in the Database Server field of the New
Server wizard (for example, ImpalaServer) by using the Database Server drop-
down list. Then, click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings.
SAS Data
Workspace Server
Integration Studio
SAS/ACCESS
HiveServer2
Interface to Hadoop
The example shows the process for establishing a SAS connection to a Hive Server. In
order for the SAS/ACCESS interface to connect with the Hive Server, the machine that
is used for the SAS Workspace Server must be configured with several JAR files. These
JAR files are used to make a JDBC connection to the Hive Server. The following
prerequisites have been satisfied:
n installation of SAS/ACCESS Interface to Hadoop. For more information, see the
configuration guide for your operating system and SAS version at http://
support.sas.com/documentation/installcenter/94.
n installation of the Hadoop JAR files required by SAS. For more information, see the
“Hadoop JAR Files” in SAS Hadoop Configuration Guide for Base SAS and SAS/
ACCESS or the configuration guide for your operating system and SAS version at
http://support.sas.com/documentation/installcenter/94.
n setting the SAS_HADOOP_JAR_PATH environment variable. See the “SAS
Environment Variables for Hadoop” appendix in SAS Hadoop Configuration Guide
for Base SAS and SAS/ACCESS.
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
150 Chapter 4 / Connecting to Common Data Sources
This section describes the steps that are used to access data in Hadoop as tables
through a Hive Server. SAS Data Integration Studio offers a series of transformations
that can be used to access the Hadoop Distributed File System (HDFS), submit Pig
code, and submit MapReduce jobs.
2 Right-click Server Manager and select the New Server option to access the New
Server wizard.
3 Select Hadoop Server from the Cloud Servers list. Then, click Next.
4 Enter an appropriate server name in the Name field (for example, HadoopServer).
You can supply an optional description. Click Next.
Establishing Connectivity to Hadoop 151
5 In the second quarter of 2015, an Encryption Options section was added to SAS
Management Console.
Enter the following server properties:
Table 4.41 Server Properties
Vendor Cloudera
Associated Machine Select the host name for the HiveService node from
the menu.
New Encrypt Key: If you enabled encryption, specify the encryption key.
Click Next.
HiveService Node Specify the host name of the machine that is running
the HiveServer2. For this example, use hdp21d1.
Port Number Specify the network port number for the Hive Service.
For this example, use the default 10000.
Establishing Connectivity to Hadoop 153
Environment Install Location /opt/TKGrid (For deployments that use SAS Visual
Analytics with Hadoop, specify the path to TKGrid on
the machines in the cluster.)
Authentication type Use the default value of (none) for this example.
Job Tracker HTTP Address For this example, use the default.
154 Chapter 4 / Connecting to Common Data Sources
7 Click Next. Examine the final page of the wizard to ensure that the proper values
have been entered. Click Finish to save the wizard settings.
2 Select Hadoop via Hive Library from the Database Data list. Click Next.
3 Enter an appropriate library name in the Name field (for example, Hive Library).
You can supply an optional description. Click Next.
4 Select a SAS server from the list and use the right arrow to assign the SAS server.
This step makes the library available to the server and makes the library visible to
users of the server. Click Next.
Libref HIVEREF
Engine HADOOP
8 Click OK. Click Next to access the next page of the wizard.
Database Schema Name See your Hadoop administrator for the correct value.
Click Next.
10 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the library settings. At this point, register tables as
explained in “Registering and Verifying Tables” on page 171.
SAS Data
Workspace Server
Integration Studio
In-Memory Tables
To define a user or user group using SAS Management Console, see “Define the DBMS
User” on page 68 and “Define the DBMS User Group” on page 69.
To define a user or user group using SAS Environment Manager, see “Managing User
Access” in SAS Environment Manager Administration: User's Guide.
Setting up a connection to a SAS LASR Analytic Server is a two-stage process that can
be accomplished in SAS Management Console or SAS Environment Manager:
Note: If you are creating these objects for use in SAS Visual Analytics, see the SAS
Visual Analytics: Administration Guide.
Note: Beginning in the third maintenance release for SAS 9.4, if SAS Visual Analytics
is part of your deployment, you can create and maintain SAS LASR Analytic Servers
and SAS LASR Analytic Server libraries using the SAS Environment Manager. For
instructions, see “Stage 1: Register a SAS LASR Analytic Server Using SAS
Environment Manager” on page 162 and “Stage 2: Register a SAS LASR Analytic
Server Library Using SAS Environment Manager” on page 165.
Establishing Connectivity to a SAS LASR Analytic Server 159
2 In the New Server wizard, select SAS Servers SAS LASR Analytic Server. Click
Next.
High-Performance Specify the host path where files that define the cluster are located
Analytics (for example, /opt/TKGrid). This field is applicable to a
environment install distributed server only.
location
5 In the Advanced Options window, click the Additional Options tab. Make sure that
Signature files location on server field references a directory that has appropriate
host protection.
When you are finished setting advanced options, click OK in the Advanced Options
window. In the wizard, click Next.
High-Performance Enter the fully qualified machine name of the host (for example,
Analytics va.abc.com).
environment host
7 Click Next.
8 If you want to add explicit grants of the Administer permission on the server, then
move identities from one list to the other. Click Next.
Note: Only users who have the Administer permission for the server can stop the
server. The server inherits settings from the repository ACT (default ACT), so it
might not always be essential to add explicit grants.
9 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
1 On the Plug-ins tab in SAS Management Console, expand Data Library Manager.
Right-click Libraries, and select New Library.
3 Enter a name (for example, Sales LASR). If necessary, adjust the location. Click
Next.
4 (Optional) Assign the library to one or more SAS Application Servers. Click Next.
Engine This field is not editable. The value SASIOLA is the engine name for a
SAS LASR Analytic Server Library.
Server tag If the data for the SAS LASR Analytic Server Library is from co-located
HDFS or NFS-mounted MapR, the server tag must be the source path
in dot-delimited format.
Note: Each server tag must be unique.
6 Click Next.
7 Assign the library to a SAS LASR Analytic Server by entering the following settings:
Table 4.49 Connection Properties
Connection Use the pre-selected value (which prepends the selected server name
with the string Connection:).
8 Click Next.
9 If you want explicit grants of the Administer permission on the library, move identities
from one list to the other. Click Next.
Note: Only users who have the Administer permission for the library can load new
tables to memory. The library inherits settings from its parent folder, so it might not
be essential to add any explicit grants.
10 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
2 Click the Side Menu icon in the upper left corner of the window.
3 Click Servers.
4 In the Servers module, click the New Server icon to display the New Server
window.
5 Specify the appropriate information in the New Server window. The window contains
only the minimum fields required to define the server. When you select the server
type, the Options section of the window automatically expands to display any
required options for the selected server type.
Table 4.50 Server Properties
Click OK.
Click Options. For a distributed server, select No. For a non-distributed server,
select Yes. Click the Save icon .
Note: Only users who have the Administer permission for the server can stop the
server or set its tables limit. The server inherits settings from the repository ACT
(default ACT), so it might not always be essential to add explicit grants.
8 Enter the Description. Click the Save icon to save the new server.
Note: When a SAS LASR Analytic Server is created using the SAS Environment
Manager, the Visual Analytics Data Administrators group is NOT added by default.
To add the group, you must perform the following steps:
b Click Authorization.
d Enter Visual Analytics Data Administrators and click the Search icon .
e Move this group to the right using the Add arrow icon . Click OK.
f Note that the Administer has a Deny icon . Click the Deny icon and click
Grant.
2 Click the Side Menu icon in the upper left corner of the window.
166 Chapter 4 / Connecting to Common Data Sources
3 Click Libraries.
5 Enter a library Name (for example, Sales LASR). If necessary, change the Location.
Click SAS LASR Analytic Server Library. The Options dialog box appears.
Engine This field is not editable. The value SASIOLA is the engine name for a
SAS LASR Analytic Server Librarys.
Close Options.
Database Enter the Database server. If the LASR library’s data is loaded from
server co-located HDFS or NFS-mounted MapR, the server tag must be the
source path in dot-delimited format.
Note: Each server tag must be unique.
8 Click OK.
9 Examine the page to ensure that the proper values have been entered. Review and
adjust permissions as needed. Enter the description. Click the Save icon to save
the new library.
Establishing Connectivity to a SASHDAT Library 167
For details about working with the server, see SAS LASR Analytic Server: Reference
Guide.
For non-distributed servers, log files are written to the directory specified in the
Signature files location on server field, if logging is enabled. The path on the
Logging Options tab is ignored by non-distributed servers.
SAS Data
Workspace Server
Integration Studio
SASHDAT Tables
This library only works with SASHDAT files that are created with the OLIPHANT
procedure or with the SASHDAT Engine. SASHDAT is the data format used for SAS
tables that are added to HDFS.
The main reason for creating a new library of the type SASHDAT is to support an
additional HDFS directory. For each HDFS directory, you need a designated HDFS
library (and a corresponding LASR library).
1 On the Plug-ins tab in SAS Management Console, expand Data Library Manager.
Right-click Libraries, and select New Library.
4 Select the appropriate server from the Available servers list and move it to the
Selected servers list. For this example, use SASApp. Click Next.
Establishing Connectivity to a SASHDAT Library 169
5 In the second quarter 2015, the Encryption Options section was added to SAS
Management Console.
Enter the following library properties:
Table 4.51 Library Properties
Engine This field is not editable. The value, SASHDAT, is the engine name
for libraries of the type SASHDAT.
HDFS path Enter the HDFS source path (for example, /dept/sales).
In the LASR library that is paired with this library, the server tag
must be the HDFS source path in dot-delimited format. For
example, if the path is /dept/sales, then the server tag is
dept.sales.
Note: To take advantage of the parallel loading features in SAS
Visual Analytics clients, limit the path to eight characters or less
and do not use a subdirectory. For example, use /sales instead
of /dept/sales. The value of the server tag, which is based on
the path, is used as a libref and must meet SAS naming
requirements.
Enable Encryption: Specifies whether to enable on-disk AES encryption for the library.
Select Inherit from data server to use the encryption setting from
the associated Hadoop server definition. Enabling encryption does
not immediately encrypt existing non-encrypted data. Select Yes to
enable on-disk AES encryption for the library.
Database Select a server from the drop-down list. Select the server that uses the
Server same host as the SAS LASR Analytic Server to use with this library.
Connection Use the pre-selected value (which prepends the selected server name
with the string Connection:).
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
Next, create a corresponding LASR library. See “Stage 2: Register a SAS LASR
Analytic Server Library Using SAS Management Console” on page 160.
When you register tables in metadata, you choose the metadata folder location to use
for storing the table metadata. Be aware that the table metadata inherits the metadata
permissions that are granted on the folder. Select or create a folder with the metadata
permissions that meet your business needs. You can also use an existing folder and
change the metadata permissions.
Verifying your access to tables in SAS Management Console is a two-stage process:
172 Chapter 4 / Connecting to Common Data Sources
3 Right-click the library that contains the tables that you need to import and select
Register Tables.
4 Verify that the values shown in the fields in the Library details group box are
correct. Click Next.
5 Click the tables that you need to select. (Hold down the Ctrl key and click to select
more than one table.)
6 Check the metadata folder path in the Location field. Navigate to a folder or create
a folder that has metadata permissions for user and group access that meets your
business needs.
Click Next.
7 Examine the final page of the wizard to ensure that the proper values have been
entered. Click Finish to save the wizard settings.
Note: You can also register tables by using SAS Data Integration Studio or by using
the METALIB procedure. For information about using the METALIB procedure, see
Chapter 2, “Managing Table Metadata,” on page 23.
Read-only Access for Reporting Libraries 173
2 Right-click a table that you need to verify and select the Open option. Examine the
data contained in the table in the View Data dialog box.
4 (Optional) You can also examine the table's Properties field. Right-click the table
and select the Properties option.
5 Click the Columns tab to see column data for the table. Close the Properties dialog
box.
All Database Data Libraries Advanced Options dialog box, Input/Output tab, option
Data access level for connection
Base SAS Library Advanced Options dialog box, Options for any host tab
SAS XML Library Library properties page of the wizard, Library Access
option
SAS Scalable Advanced Options dialog box, Options for any host tab
PerformanceData Engine
Library
SAS/SHARE REMOTE Engine Advanced Options dialog box, LIBNAME Options tab
Library
1 Edit the sasenv_local file and add the variables. This example uses sample values,
substitute the proper paths:
ODBCINI=/opt/drivers/odbc/odbc.ini
export ODBCINI
ODBCINSTINI=/opt/drivers/odbc/odbcinst.ini
export ODBCINSTINI
LD_LIBRARY_PATH=/opt/drivers/odbc/lib:\
/opt/oracle/app/oracle/product/12.1.0/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
ORACLE_HOME=/opt/oracle/app/oracle/product/12.1.0
EXPORT ORACLE_HOME
3 Restart the SAS/SHARE and SAS/CONNECT servers, if they are present in the
deployment and reference the SAS/ACCESS library.
Troubleshooting SAS/ACCESS
Connections to Relational Databases
This section provides information about troubleshooting a SAS/ACCESS library
configuration when registering tables fails. To troubleshoot the SAS/ACCESS library,
perform the following steps:
1 From the SAS Management Console, right-click the library icon and select Display
LIBNAME Statement.
2 Start SAS on the SAS server host and issue the LIBNAME statement displayed from
the SAS Management Console.
b Check and revise the LIBNAME statement. For more information about
LIBNAME statements for SAS/ACCESS engines, see SAS/ACCESS for
Relational Databases: Reference. If you are successful at this stage, then use
the Properties tab of the library to reconfigure the library.
If no members are returned, then check the schema value by performing the next
step or contacting your database administrator.
5 Log on with the user account to the host where the SAS server is running, and use
the native database client to connect to the database. If this fails, confirm the user
account has file system privileges to the database client binaries and libraries.
177
5
Optimizing Data Storage
Compressing Data
Compression is a process that reduces the number of bytes that are required to
represent each table row. In a compressed file, each row is a variable-length record. In
an uncompressed file, each row is a fixed-length record. Compressed tables contain an
internal index that maps each row number to a disk address so that the application can
access data by row number. This internal index is transparent to the user. Compressed
tables have the same access capabilities as uncompressed tables. Here are some
advantages of compressing a file:
n reduced storage requirements for the file
n fewer I/O operations necessary to read from or write to the data during processing
Figure 5.1 The Options Tab in a Table Loader Properties Dialog Box in SAS Data Integration
Studio
n all tables for a particular library. For example, when you register a Base SAS engine
library in the metadata, you can specify the COMPRESS= option in the Other
options to be appended field on the Options for any host tab. For more
information, see “Setting SAS LIBNAME Options That Affect Performance of SAS
Tables” on page 191). For third-party relational database tables, you can use the
Options to be appended field on the Other Options tab. For more information, see
“Setting SAS LIBNAME Options That Affect Performance of SAS/ACCESS
Databases” on page 193).
Note: You cannot specify compression for an SPD Engine data library.
n an individual table. In SAS Data Integration Studio, SAS tables have a Compressed
option that is available from the table properties dialog box. To use CHAR
compression, you select YES. To use BINARY compression, you select Binary.
Compressing Data 181
Figure 5.2 The Table Options Dialog Box in SAS Data Integration Studio
For SPD Engine tables and third-party relational database tables, you can use the
Table Options field in the table properties dialog box to specify the COMPRESS=
option.
Note: The SPD Engine compresses the data component (DPF) file by blocks as the
engine is creating the file. (The data component file stores partitions for an SPD Engine
table.) To specify the number of observations that you want to store in a compressed
block, you use the IOBLOCKSIZE= table option in addition to the COMPRESS= table
option. For example, in the Table Options field in the table properties dialog box, you
might enter COMPRESS=YES IOBLOCKSIZE=10000. The default blocksize is 4096 (4k).
When you create a compressed table, SAS records in the log the percentage of
reduction that is obtained by compressing the file. SAS obtains the compression
percentage by comparing the size of the compressed file with the size of an
uncompressed file of the same page size and record count. After a file is compressed,
the setting is a permanent attribute of the file, which means that to change the setting,
you must re-create the file. For example, to uncompress a file, in SAS Data Integration
Studio, select Default (NO) for the Compressed option in the table properties dialog
box for a SAS table.
For more information about compression, see SAS Data Set Options: Reference.
182 Chapter 5 / Optimizing Data Storage
Indexing Data
An index is an optional file that you can create to provide direct access to specific rows.
The index stores values in ascending value order for a specific column or columns and
includes information about the location of those values within rows in the table. In other
words, an index enables you to locate a row by value. For example, if you use SAS to
find a specific Social Security number (123-45-6789), SAS performs the search
differently depending on whether there is an index on the column that contains the
Social Security numbers:
n Without an index, SAS accesses rows sequentially in the order in which they are
stored in the table. SAS reads each row, looking for SSN=123-45-6789 until the
value is found, or all observations are read.
n With an index on column SSN, SAS accesses the row directly. SAS satisfies the
condition by using the index and going straight to the row that contains the value.
SAS does not have to read each row.
When you create an index, you designate which columns to index. You can create two
types of indexes:
n a simple index, which consists of the values of one column.
n a composite index, which consists of the values of more than one column. The
values are concatenated to form a single value
For each indexed column, you can also perform these tasks:
n declare unique values. A unique index guarantees that values for one column or the
combination of a composite group of columns remain unique for every row in the
table. If an update tries to add a duplicate value to that column, then the update is
rejected.
n keep missing values from using space in the index by specifying that missing values
are not maintained by the index.
Indexing Data 183
In addition to writing SAS code to create indexes, you can create indexes on target
tables by using SAS Data Integration Studio. In SAS Data Integration Studio, you use
the properties window for the table to index individual columns. When you create the
index, you can also specify Unique values and No missing values. Note that any
indexes registered in metadata for a target table are physically created when the job is
run. Simply editing the properties for an existing table and adding indexes does not
update the physical table. The SAS Data Integration Studio properties dialog box for a
table is shown below:
Figure 5.3 The Indexes Tab in the Properties Dialog Box for a Table Named STORE_ID
Note: For WHERE processing, the Base SAS engine uses a maximum of one
index. The SPD Engine can use multiple indexes.
Even though an index can reduce the time that is required to locate a set of rows,
especially for a large table, there are costs that are associated with creating, storing,
and maintaining the index. When deciding whether to create an index, you must
consider increased resource usage, along with the performance improvement.
Once an index exists, SAS treats it as part of the table. That is, if you add or delete
columns or modify values, the index is automatically updated.
For more information about indexes, see SAS Language Reference: Concepts.
Sorting Data
Figure 5.4 The Sort by Columns Tab in the Sort Properties Dialog Box
To manage the memory that is used for the sorting process, you can specify the
maximum amount of memory that is available to the sort. Generally, the sort size should
be less than the physical memory available to the process. If the sorting requires more
memory than you specify, then SAS creates a temporary utility file on disk. To specify a
sort size in SAS Data Integration Studio, access the Options tab in the properties
window for the sort template and enter a value in the Sortsize field, as shown below:
186 Chapter 5 / Optimizing Data Storage
Figure 5.5 The Options Tab in the SAS Sort Properties Dialog Box
The SPD Engine(SPD Engine) has implicit sorting capabilities, which saves time and
resources for SAS applications that process large tables. When the SPD Engine
encounters a BY clause, if the data is not already sorted or indexed on the BY column,
then the SPD Engine automatically sorts the data without affecting the permanent table
or producing a new table. You can change the implicit sorting options when you define
an SPD Engine library in the metadata. See “Setting SAS LIBNAME Options That Affect
Performance of SAS SPD Engine Tables” on page 197.
For more information about the SORT procedure, see “SORT” in Base SAS Procedures
Guide.
Multi-Threaded Sorting
The SAS system option THREADS activates multi-threaded sorting, which achieves a
degree of parallelism in the sorting operations. This parallelism is intended to reduce the
real time to completion for a given operation. However, the parallelism comes at the
possible cost of additional CPU resources. For more information, see see “Support for
Parallel Processing” in SAS Language Reference: Concepts.
Buffering Data for Base SAS Tables 187
The performance of the multi-threaded sort is affected by the value of the SAS system
option CPUCOUNT=. CPUCOUNT= indicates how many system CPUs are available for
use by the multi-threaded sort. The multi-threaded sort supports concurrent input from
the partitions of a partitioned table.
Note: For information about the support of partitioned tables in your operating
environment, see the SAS documentation for your operating environment.
For more information about THREADS and CPUCOUNT=, see the chapter about SAS
system options in SAS System Options: Reference.
n tuning the size of table pages on disk by using the BUFSIZE= system option. SAS
uses the BUFSIZE= option to set the permanent page size for the SAS table. The
page size is the amount of data that can be transferred for an I/O operation to one
buffer. If you know that the total amount of data is going to be small, you can set a
small page size, so that the total table size remains small and you minimize the
amount of wasted space on a page. Large tables that are accessed sequentially
benefit from larger page sizes because sequential access reduces the number of
system calls that are required to read the table.
n adjusting the number of open page buffers when the SAS table is processed.
Increasing the value of the BUFNO= option can improve performance by enabling
applications to read more data with fewer passes; however, your memory usage
increases. You must determine the optimal value for your needs.
Besides specifying SAS system options on the command line or inside a SAS program
with the OPTIONS statement, you can set the BUFSIZE= and BUFNO= system options
in SAS Data Integration Studio. For example, you can set these System Options in the
properties window for a table loader transformation.
For more information about the BUFSIZE= and BUFNO= options, see the SAS Data Set
Options: Reference and the documentation for your operating environment.
Buffering Data for SAS/ACCESS Databases 189
Note: In addition, the SASFILE statement enables you to store the entire Base SAS
table in memory. The table remains open until you close it because SASFILE caches
the data and the open request. For more information about the SASFILE statement, see
the SAS Statements: Reference.
For more information about the INSERTBUFF= and READBUFF= options, see
SAS/ACCESS for Relational Databases: Reference.
190 Chapter 5 / Optimizing Data Storage
1 It creates threads, which are standard operating system tasks that are controlled by
SAS, within the SAS session.
3 It causes the DBMS to partition the result set and reads one partition per thread. To
cause the partitioning, SAS appends a WHERE clause to the SQL so that a single
SQL statement becomes multiple SQL statements, one for each thread.
Threaded Reads only increase performance when the DBMS result set is large.
Performance is optimal when the partitions are similar in size. In most cases, threaded
Reads should reduce the elapsed time of the SAS job. However, threaded Reads
generally increase the workload on the DBMS. For example, threaded Reads for DB2
under z/OS involve a trade-off, generally reducing job elapsed time but increasing DB2
workload and CPU utilization.
Threaded Reads are most effective on new, faster computer hardware running SAS,
and with a powerful parallel edition of the DBMS. For example, if SAS runs on a fast
uniprocessor or on a multiprocessor machine and your DBMS runs on a high-end SMP
server, you receive substantial performance gains.
For information about how to turn the threaded Read function on or off for a DBMS
library, see “Setting SAS LIBNAME Options That Affect Performance of SAS/ACCESS
Databases” on page 193.
For information about threaded Reads, see SAS/ACCESS for Relational Databases:
Reference.
Setting SAS LIBNAME Options That Affect Performance of SAS Tables 191
2 It repeatedly reads the entire table, each time doubling the number of threads used
until the maximum number is reached. The maximum number of threads is
determined by the CPUCOUNT= SAS system option and is specified when SAS is
started.
The resulting log file shows timing statistics for each cycle. You can examine this
information to determine whether your system is configured correctly. The program is
available at http://support.sas.com/rnd/scalability/spde/valid.html.
Figure 5.7 The Options for Any Host Tab in the Advanced Options Dialog Box for a Base SAS
Library
The Other option(s) to be appended field can be used to specify LIBNAME options
such as COMPRESS=. (See “Compressing Data” on page 179.)
For information about each of the LIBNAME options in the Advanced Options dialog
box, click the Help button.
Figure 5.8 The Optimization Tab in the Advanced Options Dialog Box for a DB2 Library for
UNIX and PC
The tabs that are available in the Advanced Options dialog box, as well as the options
on each of the tabs, vary between database management systems. The following list
provides a description of the options on Optimization tab for DB2 libraries for UNIX and
PC:
Pass functions to the DBMS that match those supported by SAS (SQL_ FUNCTIONS=)
when set to ALL, specifies that functions that match functions supported by SAS
should be passed to the DBMS. The functions that are passed are: DATE,
DATEPART, DATETIME, TIME, TIMEPART, TODAY, QRT, COMPRESS, SUBSTR,
DAY, SECOND, INDEX, TRANWRD, HOUR, WEEKDAY, LENGTH, TRIMN,
MINUTE, YEAR, REPEAT, MOD, MONTH, BYTE, and SOUNDEX. Use of this option
can cause unexpected results, especially if used for NULL processing and date,
time, and timestamp handling. Exercise care when using this option.
Whether to check for null keys when generating WHERE clauses (DBNULLKEYS=)
specifies whether the WHERE clause should detect NULL values in columns. Valid
values are YES or NO. YES is the default for most interfaces and enables SAS to
prepare the statement once and use it for any value (NULL or NOT NULL) in the
column.
For more information about threaded Reads, see “Using Threaded Reads” on page
190.
The Other Options tab, which is available for all database management systems, can
be used to specify LIBNAME options such as the COMPRESS= option. For more
information, see “Compressing Data” on page 179.
Setting SAS LIBNAME Options That Affect Performance of SAS SPD Engine Tables 197
For information about each of the LIBNAME options in the Advanced Options dialog
box, click the Help button. For information about all SAS/ACCESS LIBNAME options,
see SAS/ACCESS for Relational Databases: Reference.
Figure 5.9 The Options for Any Host Tab in the Advanced Options Dialog Box for an SPD
Engine Library
paths accept the overflow from the immediately preceding path. The index path area
is best configured as multiple paths. Use a volume manager file system that is
striped across multiple disks (RAID 0) to enable adequate index performance, both
when evaluating WHERE clauses and creating indexes in parallel. Redundancy
(RAID 5 or RAID 10) is also recommended.
By sort (BYSORT=)
specifies that the SPD Engine should perform an automatic implicit sort when it finds
a BY statement for processing data in the library (unless the data is indexed on the
BY column). Valid values are YES (perform the sort) and NO (do not perform the
sort). The default is YES.
In addition to the LIBNAME options, there are also table and system options that can be
used to tune SPD Engine performance. For example, the SPDEUTILLOC= system
option allots space for temporary files that are generated during SPD Engine
operations. This area is best configured as multiple paths. Use a volume manager file
system that is striped across multiple disks (RAID 0) to reduce out-of-space conditions
and improve performance. Redundancy (RAID 5 or RAID 10) is also recommended
because losing the work area could stop the SPD Engine from functioning.
The “Quick Guide to the SPD Engine Disk-I/O Set-Up” available at http://
support.sas.com/rnd/scalability/spde/spde_setup.pdf helps you do the following:
n determine the amount of space that needs to be allocated to the data, metadata,
index, and work areas
n evaluate the advantages and disadvantages of different RAID groups for each of the
different types of areas
For more information about table and other system options for the SPD Engine, see
http://support.sas.com/rnd/scalability/spde/syntax.html. For more information about
each of the LIBNAME options in the Advanced Options dialog box, click the Help
button.
The function of a grid is to distribute tasks. Each of the tasks that are distributed across
the grid must have access to all the required input data. Computing tasks that require
substantial data movement generally do not perform well in a grid. To achieve the
highest efficiency, the nodes should spend the majority of the time computing rather
than communicating. With grid computing using SAS Grid Manager, the speed at which
the grid operates is related more to the storage of the input data than to the size of the
data.
Data must either be distributed to the nodes before running the application or— much
more commonly—made available through shared network libraries. Storage on local
nodes is discouraged. The data storage must scale to maintain high performance while
serving concurrent data requests.
SAS Data Integration Studio can report the following measures for jobs:
n number of records processed
n duration of step in the job
n I/O statistics
To view the metrics within SAS Data Integration Studio, right-click the diagram
background for the job and select Collect Runtime Statistics. When the job is run,
view the Statistics tab in the Details area of the window.
202 Chapter 5 / Optimizing Data Storage
203
6
Managing OLAP Cube Data
The data warehouse is a structure better suited for this type of querying. In a data
warehouse, data is maintained and organized so that complicated queries and
summaries can be run. OLAP further organizes and summarizes specific categories and
subsets of data from the data warehouse. One particular type of data structure derived
from a data warehouse is the cube. A cube is a set of data that is organized and
structured in a hierarchical, multidimensional arrangement. Such an arrangement
results in a robust and detailed level of data storage with efficient and fast query returns.
Exporting and Importing Cubes 205
The data administrator impact of exporting and importing cubes is that when cubes are
imported, the tables used in the cube must be available. Building the aggregations for
the cube is also computationally intensive. The following list highlights some best
practices:
n It is impractical to package the detail tables and summary data for large cubes. Do
not export them in the package.
n If the cube is being imported to a new metadata server (as opposed to being moved
to a new folder on the same metadata server), then make sure the same data
sources for the detail tables used by the original cube are available and registered.
Accomplish this by registering the same data servers and data libraries on the
destination metadata server. If the cube uses a drill-through table, ensure that the
library is pre-assigned.
n When importing the cubes, be prepared to associate the cube with an OLAP
schema. Consider that the OLAP schema determines the group of cubes that an
OLAP server can access.
n Once the cube is imported, the cube and its job are registered in metadata with
relationships to an OLAP schema, tables, and folders. By default, the aggregations
for the cube must be built after the cube is imported. Due to the computational
intensity, consider rebuilding the cube during a period of low activity.
206 Chapter 6 / Managing OLAP Cube Data
New OLAP schemas are created with the Create OLAP Schema wizard in SAS OLAP
Cube Studio or SAS Management Console. SAS OLAP Servers are assigned to new
OLAP schemas by changing server properties in SAS Management Console. To create
a new OLAP schema or assign an OLAP schema to a SAS OLAP Server using SAS
Management Console, see “Create or Assign an OLAP Schema” on page 206. A SAS
OLAP Server reads its assigned OLAP schema from metadata only as the server starts.
Assigning a new OLAP schema to a server requires that you restart the SAS OLAP
Server.
When building, updating, or deleting cubes, you can specify OLAP schemas in the Cube
Designer wizard of SAS OLAP Cube Studio. Alternatively, if you choose to write SAS
code for PROC OLAP, the schema is specified in the OLAP_SCHEMA= option of the
METASVR statement.
3 Under Server Manager, locate the SAS Application Server that contains the SAS
OLAP Server. The name of one such SAS Application Server might be SASApp, for
example.
6 Click New to create a new OLAP schema, or select the down arrow to choose an
existing OLAP schema.
8 Restart the SAS OLAP Server using the SAS OLAP Server Monitor.
Building a Cube
Before building a cube, you should collect and scrub your data in addition to planning a
dimensional design. When you define the cube, you define the dimensions and
measures for the cube along with information about how aggregations should be
created and stored. There are two methods of creating a cube:
n You can submit PROC OLAP code by using either the SAS Program Editor or a
batch job. If you use PROC OLAP, the cube is created, and then the cube definition
is stored in a metadata repository. This is referred to as the long form of PROC
OLAP.
n You can use the Cube Designer interface in SAS OLAP Cube Studio to define and
create the cube. The Cube Designer first stores the cube definition in a metadata
208 Chapter 6 / Managing OLAP Cube Data
repository, and then submits a shorter form of PROC OLAP code to create the cube.
This is referred to as the short form of PROC OLAP.
Note: The Cube Designer can also be launched from SAS Data Integration Studio.
n If you have not specified a server, or if the server that is specified is not valid,
then you are prompted again for a server.
n Select the library that contains the tables that you want to use, and then
select Next.
n Select the tables to register and then select Next.
n Select Finish. The table definitions are register in metadata.
o If you start to create a cube and do not see the table that you need to continue,
then you can click the Define Table button in any of the windows that prompt for
tables.
n In the Finish window of the cube designer, you are given the option to create the
physical cube. The metadata definition is always stored as you leave the Finish
window. However, you can defer creation of the physical cube because it might be a
resource and time intensive process. If you choose to create the cube as you leave
the Finish window, then a SAS Workspace Server must be defined so that you can
submit PROC OLAP code to it. This server is defined in SAS Management Console.
For more information about the different data types that you can use to load cubes from,
see “Planning for SAS OLAP Cubes” in SAS OLAP Server: User's Guide.
Note: The SAS Metadata Server enables duplicate librefs to be defined in the
metadata. To ensure that the correct library definition is found on the metadata server,
you should assign the libref by using the LIBNAME statement for the metadata engine
before submitting the PROC OLAP code. Otherwise, PROC OLAP selects the first
library definition that it finds with your specified libref, and it associates your cube
metadata with that definition. The selected library definition might or might not contain a
description of the data that was actually used to build your cube. For more information
about using the LIBNAME statement for the metadata engine, see “Metadata LIBNAME
Engine” in SAS Language Interfaces to Metadata.
When a SAS OLAP cube is created, a directory for that cube is also created. This
directory is assigned the same name as the cube, but in uppercase letters. For
example, if you save a cube in c:\olapcubes and name the cube Campaigns, the
cube is saved in the directory c:\olapcubes\CAMPAIGNS.
210 Chapter 6 / Managing OLAP Cube Data
n In SAS OLAP Cube Studio, you can specify a table for drill-through when you create
or edit the cube using the Cube Designer wizard. On the Drill-Through page of the
wizard, either select a table and click the right-arrow and then Next to specify the
drill-through table, or just click Next if drill-through is not needed. The following
figure shows the Cube Designer - Drill Through page of the Cube Designer wizard:
For more information about the Cube Designer wizard, see the SAS OLAP Cube
Studio Help. Note that for star schema tables, a view that fully joins the fact and
dimension tables is the drill-through table.
n In the PROC OLAP statement, use the DRILLTHROUGH_TABLE option to specify
the name of the drill-through table to use. For more information about the
DRILLTHROUGH_TABLE option, see “The OLAP Procedure” in SAS OLAP Server:
User's Guide.
212 Chapter 6 / Managing OLAP Cube Data
To specify a library as pre-assigned for an OLAP server, perform the following steps:
1 In Data Library Manager (in SAS Management Console), find the Libraries folder
and perform one of the following tasks to get to the dialog box that lets you select
advanced options:
n For a new library, right-click the Libraries folder and select New Library to start
the New Library wizard. Then navigate to the page that enables you to specify
the libref.
n For an existing library, open the Libraries folder and right-click the desired
library. Select Properties from the drop-down menu, and then select the Options
tab in the properties dialog box.
Making Detail Data Available to an OLAP Server for Drill-Through 213
3 Select the Library is pre-assigned check box on the Pre-Assign tab in the
Advanced Options dialog box.
4 On the Assign tab of the properties dialog box or the server selection page of the
New Library wizard, ensure that the selected application server is the server
container that contains your OLAP server.
5 Click OK in the properties dialog box, or finish entering information in the wizard.
The selected library is assigned after the selected OLAP server starts. After the OLAP
server starts, ensure that the library is pre-assigned to the correct SAS OLAP server.
The OLAP server also generates a record in the log file stored at SAS-
configuration-directory\Lev1\SASApp\OLAPServer\Logs\.
The following example shows how pre-assigned libraries are identified in the log file:
2008-08-04T13:00:13,068 WARN [00000010] :SYSTEM@host - NOTE: Libref odbc successfully assigned from
logical server.
2008-08-04T13:00:13,068 WARN [00000010] :SYSTEM@host - NOTE: Libref wrstemp successfully assigned from
logical server.
2008-08-04T13:00:13,068 WARN [00000010] :SYSTEM@host - NOTE: Libref wrsdist successfully assigned from
logical server.
2008-08-04T13:00:13,068 WARN [00000010] :SYSTEM@host - NOTE: Libref stpsamp successfully assigned from
logical server.
2008-08-04T13:00:13,068 WARN [00000010] :SYSTEM@host - NOTE: Libref SASDATA successfully assigned from
logical server.
For an existing information map, open the information map, right-click it, and then select
Properties from its drop-down menu. Select the Allow drill-through to detail data
check box on the Definition tab in the Information Map Properties dialog box. This
check box is displayed only when a drill-through table is specified for the cube that the
OLAP information map is using as its data source.
Display Detail Data for a Large Cube 215
You can increase the number of drill-through rows that your OLAP server can handle by
changing the OLAP server definition with the Server Manager plug-in to SAS
Management Console. To increase the number of drill-through rows, perform the
following steps:
1 In the navigation tree for Server Manager, find the node that represents your
physical OLAP server.
216 Chapter 6 / Managing OLAP Cube Data
3 In the properties dialog box, select the Options tab, and then click Advanced
Options.
4 In the Advanced Options dialog box, select the Server tab, and then enter the
desired value for the Maximum number of flattened rows field.
Recommended Reading
Glossary
aggregation
a summary of detail data that is stored with or referred to by a cube.
application server
a server that is used for storing applications. Users can access and use these server
applications instead of loading the applications on their client machines. The
application that the client runs is stored on the client. Requests are sent to the server
for processing, and the results are returned to the client. In this way, little information
is processed by the client, and nearly everything is done by the server.
authentication domain
a SAS internal category that pairs logins with the servers for which they are valid.
For example, an Oracle server and the SAS copies of Oracle credentials might all be
classified as belonging to an OracleAuth authentication domain.
client application
an application that runs on a client machine.
cube
See OLAP cube.
data mart
a subset of the data in a data warehouse. A data mart is optimized for a specific set
of users who need a particular set of queries and reports.
for storing large amounts of data that originates in other corporate applications or
that is extracted from external data sources.
DBMS
See database management system.
library reference
See libref.
hosts, and/or schema names as part of the process of moving metadata from one
environment to another.
OLAP
See online analytical processing.
OLAP schema
a container for OLAP cubes. A cube is assigned to an OLAP schema when it is
created, and an OLAP schema is assigned to a SAS OLAP Server when the server
is defined in the metadata. A SAS OLAP Server can access only the cubes that are
in its assigned OLAP schema.
promotion
See metadata promotion.
resource template
an XML file that specifies the information that is needed for creating a metadata
definition for a SAS resource.
schema
a map or model of the overall data structure of a database. A schema consists of
schema records that are organized in a hierarchical tree structure. Schema records
contain schema items.
SPD Engine
See SAS Scalable Performance Data Engine.
SPD Server
See SAS Scalable Performance Data Server.
warehouse
See data warehouse.
XML
See Extensible Markup Language.
223
Index
A autoexec files
pre-assigning libraries using
access information in 57
defining ODBC data sources
120
B
ODBC connectivity to
databases 119
Base SAS engine
registering database libraries
metadata engine invocation of
123
49
registering database server
Base SAS library
121
registering 72
registering SAS Federation
Base SAS tables
Server 125
buffering data 187
registering SAS Federation
BLKSIZE= LIBNAME option
Server libraries 126
192
Access
block insert buffer size 194
ODBC connectivity to
block read buffer size 195
databases 13
block size 192
ADD command
buffer size
SPDO procedure 18
for block insert 194
aggregations 204
for block read 195
APIs (application programming
buffering table data 187, 189
interfaces) 12
BYSORT= LIBNAME option
ARM (application response
199
monitoring) 201
asynchronous communication
10
Attunity 20
authorization facility 49
224 Index
C to data sets 3
to Excel files 81
cache to external files 8
page caches 193 to flat files 83
CACHENUM= LIBNAME option to Hadoop Server 148
193 to Impala Server 144
change data capture (CDC) 20 to information maps 88
CLUSTER CREATE command to library of data sets 72
SPDO procedure 17 to ODBC databases using
cluster tables, dynamic 17 Microsoft Windows NT
CLUSTER UNDO command Authenication 92
SPDO procedure 18 to OLE DB databases 100
clustered data tables 17 to Oracle databases 11, 114
columns to SAP HANA servers 139
defining for flat files 84 to SAP servers 19, 134
compression 179 to SAS Federation Server 124
configuration to SPD Server 16, 129
libnames.parm file 130 to Teradata databases 108
SPD Engine hardware 191 to XML data 87
configuration files to XML files 9
editing for pre-assigned cube metadata
libraries 55 storage location requirements
for user-defined formats 76 210
connectivity cubes
ODBC 12 See OLAP cubes
ODBC, to Access databases
13
D
ODBC, to Microsoft Access
119
data access
ODBC, to Oracle databases
local and remote 5
13
OLAP cubes 204
SAS LASR Analytic Server
read-only for reporting
157
libraries 173
SAS LASR libraries 160
SASHDAT 167
Index 225
E F
message queues 10
metadata
See also table metadata
230 Index
R
P
RDBMS
page caches 193 SAS/ACCESS connections to
partitions 68
paths for storing 198 troubleshooting SAS/ACCESS
size of 199 connections to 175
PARTSIZE= LIBNAME option read-only access
199 for reporting libraries 173
performance READBUFF= LIBNAME option
See also data storage 195
optimization registering
SAS tables 191 access SAS Federation
SAS/ACCESS databases 193 Server library 126
SPD Engine tables 197 Base SAS library 72
physical tables data 5
updating table metadata to DBMS library 71
match 28 DBMS server 70, 102
platform clients Hadoop Hive database library
assigning libraries 46 154
pooled workspace server Hadoop server 150
assigning libraries 50 Impala servers 145
pre-assigning libraries 44, 53 libraries 67
editing configuration files 55 Microsoft Access database
externally 47 121
flagging libraries as pre- Microsoft Access database
assigned 54 library 123
large number of libraries 53 Oracle database library 117
METALIB procedure and 24 Oracle database server 115
232 Index
adding 28 U
assessing potential changes
26 UNIX
changing the update rule 29 environment variables for
creating for new library 25 SAS/ACCESS 174
excluding tables 30 update rule 29
selecting tables 30 UPDATE_RULE statement
specifying which tables are METALIB procedure 29
affected 30 user-defined formats
updating 28 configuration file 76
updating to match data in connectivity to library of data
physical tables 28 sets 76
tables user-written external file wizard
buffering table data 187, 189 8
clustered data tables 17
dynamic cluster tables 17
information map tables 90 W
LIBNAME options affecting
SAS table performance WHERE clauses
191 null keys when generating
LIBNAME options affecting 195
SPD Engine table
performance 197
registering and verifying 171 X
sorting database tables 187
XML data 9
TEMP= LIBNAME option 199
connectivity to 9, 87
temporary subdirectories 199
libref for 9
Teradata
XML LIBNAME engine 9
connectivity to databases 108
XML Writer transformation 9
third-party databases 11
XMLMaps 9
threaded DBMS access 196
threaded reads 190
troubleshooting Z
SAS/ACCESS connections to
RDBMS 175 z/OS
Index 235
SAP on 139
236 Index