Managing Libraries with SAS Enterprise Guide Explorer

Overview

SAS Enterprise Guide Explorer displays metadata objects in a tree. You can expand an element in the tree to view the contained objects. You might be asked to enter a user ID and password to view those objects.
When your user definition connects you to a SAS Metadata Server, you use SAS Management Console to create server definitions. When the server definitions are available, you can use SAS Management Console or SAS Enterprise Guide Explorer to manage libraries, tables, and logins.
For information about creating and managing servers, see the SAS Intelligence Platform: Application Server Administration Guide. For additional information about configuring libraries on network servers, see the SAS Intelligence Platform: Data Administration Guide.

About Libraries and Tables

Libraries are collections of files that are stored on servers and accessed from SAS Enterprise Guide. When you add a metadata definition for a library, you make the metadata definition available to all the network SAS Enterprise Guide installations that have access to a specific metadata repository. Access is also granted to all other applications that use the repository. The metadata definition for a library includes the path, engine, and other options for the library. The metadata definition corresponds to the information that is specified in a LIBNAME statement.
The options that are specified in a library definition work like the commands in an AUTOEXEC.BAT file. These LIBNAME statement options are stored on the client and then executed when a SAS Enterprise Guide application connects to the specified SAS server.
Table definitions specify the tables and columns that are available within a library. You can create table definitions by using one of the following functions:
  • using the Update Library Metadata function in SAS Enterprise Guide
  • using the Register Tables function in SAS Management Console
  • running the METALIB procedure in a SAS session (which synchronizes metadata with the physical contents of a library)
  • using SAS Data Integration Studio to build a data warehouse
You can include authorization settings for both library and table definitions. The authorizations specify which libraries and tables a user can access and whether the user can change the contents of a library.

About the Metadata LIBNAME Engine

To understand how SAS Enterprise Guide assigns and accesses libraries, it is helpful to understand the metadata LIBNAME engine. The META engine enables you to use a LIBNAME statement to reference a metadata definition for a library, rather than specifying a physical location. By default, the META engine provides Read-Only access to a library, which prevents the library contents from being different from the library metadata.
If you use the METAOUT=DATA option in the LIBNAME statement, the META engine can access tables that are not defined in metadata but that exist in the physical library. This option enables you to add and modify tables in the library. However, any metadata authorization settings that have been applied to tables or columns in the library are enforced. If a SAS program changes the contents of a library that uses the METAOUT=DATA option, you must synchronize the physical data and the metadata. To synchronize the data, you can use the Register Tables function in SAS Management Console, the METALIB procedure, or the Update Library Metadata task in SAS Enterprise Guide.

Add a Library

To add a library in SAS Enterprise Guide Explorer, select Filethen selectNew Library and follow the prompts on each page of the Library Wizard. Use the following information as a guide, because the pages and options that you see will depend on your situation.
On page 1 of the Library Wizard, the eight-character library name must be unique on that server. The library name is entered in uppercase letters.
On page 2 of the wizard, you assign the library using one of the following:
SAS Enterprise Guide
specifies that SAS Enterprise Guide uses the metadata that is supplied in the wizard to assign the library, using the native engine. No table or column metadata is used.
SAS Server
specifies that the library is assigned in an AUTOEXEC statement or through the METAAUTOINIT system option. SAS Enterprise Guide does not use the metadata that you specify for the library, but assumes that the library is already assigned.
Metadata LIBNAME Engine
specifies that SAS Enterprise Guide assigns the library by using the META engine.
If Show only tables with metadata definitions is selected, then only tables that have metadata definitions appear when the library is selected. When this option is selected, the library is always Read-Only. This option is equivalent to the default behavior of the META engine. If the library is assigned using the metadata LIBNAME engine and this option is selected, it is equivalent to the METAOUT=ALL option.
If the check box is not selected, then all tables in the library will appear. Tables appear even if you deny ReadMetadata permission or if the table is not registered in the metadata repository. Permissions are enforced if a user tries to open a restricted table. In this mode, the library is not Read-Only. This option is equivalent to the METAOUT=DATA option.
If Allow tables to be created and deleted is selected, then you can read, update, create, and delete tables. You can also insert records, create columns, and change column properties in tables. A newly created table must be registered in metadata before it can be read.
On page 4 of the wizard, you specify the engine type for the library (file system, database system, or WebDAV) and specific information for the engine type that you select. If you are defining a file system or database system library, you must choose an engine. Select the SAS engine with which the data was created. For more information about engines, see the SAS documentation for your operating environment. See also the chapter that corresponds to your database management system in SAS/ACCESS for Relational Databases: Reference.
Also, on page 4 of the wizard, you might be asked to specify the physical path where the library resides on the server. Depending on the value of the Engine Type field, Path might not be present. You can use the following wildcards to substitute values into the specified path:
<userid>
substitutes the Windows user ID. For example, using the Windows user ID ebeacon, the literal Path value in the wizard is \\librarypath\<userid> and the actual path is\\librarypath\ebeacon.
<sample>
substitutes the SAS Enterprise Guide sample directory. For example, <sample>\data can become C:\Program Files\SAS\Enterprise Guide 5.1\Sample\data.
<serveruser>
substitutes the server logon user ID.
<serverpassword>
substitutes the server password.
<libraryuser>
substitutes the library logon user ID.
<librarypasword>
substitutes the library logon password.
Note: The libraries that you create with these wildcard substitutions can fail to provide access to those libraries for client applications other than SAS Enterprise Guide and the SAS Add-In for Microsoft Office.
On page 5 of the wizard, you can specify library options and values. If wildcards are valid in the Path field, then you can also use them in the Options field. Avoid using prompting options such as DBPROMPT=YES. For additional options, see the chapter that corresponds to your database management system in SAS/ACCESS for Relational Databases: Reference.
On page 6 of the wizard, select the folder to which the library belongs. If you do not select a folder, the library is automatically stored in the Shared Data folder.
On page 7, test the library definition. If the library name or libref is not unique on all servers, the conflict is listed in the Status column.
After you complete the wizard, the library is created and then displayed in the viewer under the client libraries for the specified servers.

Create an Output Library

By default, SAS Enterprise Guide stores output data in the Sasuser, Work, or Egtask library, or a user-created output library on a SAS server. To change the default output library, select Toolsthen selectOptionsthen selectOutput Library. You might want to change the default output directory to create a library that can be accessed by all SAS Enterprise Guide users.
Be sure not to direct output to Sasuser on a UNIX or z/OS server, because that library is temporary in those operating environments.
To change your output directory, open SAS Management Console and select Data Library Manager, and then select New Library. Choose Pre-assigned Library as the library type to ensure that the library is assigned whenever the server starts. Make sure that the library is defined on all servers that will be used with SAS Enterprise Guide.
Another strategy for changing your output library is to use SAS Management Console to add the LIBNAME statement for the library to all server definitions that are used by SAS Enterprise Guide. For new servers, include the statement in the SAS start-up statements field in the New Server wizard. For servers that have already been defined, include the LIBNAME statement in the Properties dialog box.

Assigning Libraries

When you view a SAS server in SAS Enterprise Guide or SAS Enterprise Guide Explorer, you see a list of libraries on the selected server. The list includes both libraries that are assigned (identified with a yellow icon) and libraries that are unassigned (identified with a white icon).
Assigned libraries are libraries that are pre-assigned or assigned in an autoexec program. Unassigned libraries are libraries that have been defined in metadata but have not yet been assigned or accessed. To assign an unassigned library, right-click on the library and select Assign. If the library definition was created by SAS Enterprise Guide Explorer, the library is assigned using the method that was specified in the library definition. Otherwise, the library is assigned using the META engine in its default mode, which means that the library is Read-Only. The library contents also match the metadata definition, so physical tables that are not defined in metadata are not displayed. Furthermore, tables and columns are not displayed if the user is not authorized to see that data.

Update Library Properties

Properties for libraries include information such as names, pathnames, and LIBNAME options. To view or update this information, follow these steps:
  1. Select a server, and then locate the library whose properties you want to change.
  2. Select the library, and then select Properties.
  3. Select the item in the selection pane that corresponds to the information that you want to update.

Reset a Library Login

When you are prompted for credentials when connecting to a library, those credentials are stored in metadata so they can be used later. The Reset login option clears these credentials, so you are prompted for credentials the next time you connect to the library.
Note: You cannot use this option on libraries that have been assigned using the metadata LIBNAME engine (MLE).
To reset the login for a library, right-click on the library name and select Reset login.

Manage Logins with SAS Enterprise Guide Explorer

To add, modify, or delete your logins, open SAS Enterprise Guide Explorer and select Filethen selectManage Logins. The Login Manager dialog box lists your current logins. You can edit an existing login or add a new one.
In the Edit Login dialog box, you select an authentication domain from a list of available domains. These domains are created in SAS Management Console.