SAS Libraries and Tables

Defining Libraries and Tables

When you set up the SAS OLAP Cube Studio environment, you must define the data tables that are used to build cubes and the libraries that they are assigned to. The following tasks must be completed:
  • A metadata server must be started.
  • A workspace server must be started and registered in the metadata.
  • The metadata for the data tables and libraries must be registered in the metadata and stored on the workspace server.
Note: You must have ReadMetadata and WriteMetadata permissions to perform these tasks.
The tables and libraries can be defined in SAS applications such as SAS Data Integration Studio or SAS Management Console before you set up your SAS OLAP Cube Studio environment. If however, this is not done beforehand, you can define them in SAS OLAP Cube Studio. You need to have your tables and libraries defined if you plan to do either of these tasks:
  • create the physical cube in addition to registering its metadata
  • manually add, modify, or drop specific aggregations for a cube
You can use the Source Designer wizard to define your data tables. Use the New Library wizard to define your libraries.

Creating a New Library Definition for Source Data Tables

You can create a new library definition for your source data tables after you start a SAS Metadata Server and define a SAS Workspace Server in a SAS metadata folder. You can create new library definitions using the New Library Wizard, which is available from SAS OLAP Cube Studio and SAS Management Console.
If you have more than one SAS Workspace Server defined, you should assign the library to all of the workspace servers that might be used to create cubes. Otherwise, SAS OLAP Cube Studio attempts to download the data to the server where the cube is being built. This requires SAS/CONNECT and might not be the most efficient way to build a cube.
These steps explain how to use SAS OLAP Cube Studio to launch the New Library Wizard and define a new library:
  1. Connect to the SAS Metadata Server.
  2. Select File then selectNewthen selectLibrary. This opens the New Library Wizard.
  3. Select a Resource Template and then click Next to continue.
    Note: If you connected to the SAS Metadata Server with an unrestricted metadata profile, you are prompted to enter your user ID and password.
  4. In the New Library Wizard, enter the library name. You can also enter an optional description. Click Next.
  5. Enter values for the libref, the Engine (BASE is the default), the Content Server, and the Path Specification fields. Follow these guidelines:
    • The libref is a short name (or alias) for the full physical name of a SAS library (for example, sasuser).
    • The path specifies the physical location of the tables contained in the library that you are defining. Select an existing path from the box or click New to enter a new path.
    • If your data is accessed through a WebDAV content server, select the Enable webDAV Support check box. The content server specifies the HTTP server that is used to access the data.
    • Click the Advanced Options button to set host-independent options such as file encoding, as well as host-specific options. Click OK to close the dialog box and return to the New Library Wizard.
    • Click Next.
  6. Select the SAS Workspace Servers on which the new library is to reside. Click Next.
  7. Click Finish to complete the new library definition.
Note: For further information about SAS Libraries see “Assigning Libraries” in the SAS Intelligence Platform: Data Administration Guide.

Defining Tables Used to Build Cubes

You define tables using the Source Designer wizard, which is available from SAS OLAP Cube Studio and SAS Data Integration Studio. Here is a list of the tables that can be used to define a cube:
  • detail tables (unsummarized data)
  • fact tables and dimension tables (for cubes based on star schemas)
  • aggregation tables (fully summarized external tables)
  • drill-through tables (views maintained by the user that represent all of the data used to define a cube)
These steps explain how to use SAS OLAP Cube Studio to launch the Source Designer wizard and define new tables:
  1. Connect to the SAS Metadata Server.
  2. Select Filethen selectRegister Table. This opens the Source Designer wizard. The Source Designer wizard is also available from the Cube Designer wizard.
  3. Select the SAS data source and click Next.
  4. Select the name of the SAS library that points to the tables that you are importing from the current SAS Workspace Server. Click Next to see a list of SAS data sets in the selected library. (You can also click New to create a new library.)
  5. Select the data sets that you want to load into the metadata, and click Next.
  6. Click Finish.
Note: If you previously selected a server context and tested the SAS Workspace Server connection, you might not be prompted for the name of the server context.

Renaming Tables

Introduction

In SAS OLAP Cube Studio, you can change the name of a data table that you have registered in the SAS metadata folder. The table name that you see in the Tree View is the display name for the table, similar to a label or short description. You must have WriteMetadata permission on the table for which you want to view properties.

Renaming a Table from the Tree View

To rename a table from the Tree View, complete the following steps.
  1. In the Tree View, select the Inventory tab. Select a data table from the Table node.
  2. Select the Rename function from the Edit menu or from the table's context menu. The table name in the Tree View is highlighted.
  3. Enter a new name and select ENTER.

Renaming a Table from the Properties Dialog Box

To rename a table from the Properties dialog box, complete the following steps.
  1. In the Tree View, select the Inventory tab. Select a data table from the Table node.
  2. Select the Properties function from the Edit menu or from the table's context menu.
  3. Select the General tab.
  4. Enter a new name in the Name field.
  5. Click OK to save the change and close the dialog box, or click Apply to save the change and remain in the dialog box.
For information about naming tables, see Naming Guidelines and Rules for the SAS OLAP Server .

Deleting Tables

You can delete tables that you have registered in the SAS metadata. In order to delete a table, you must have been granted WriteMetadata permission on that table. Complete the following steps to delete a table.
  1. In the Tree View, select the Inventory tab.
  2. Select Tables and open the list of tables.
  3. Select the table that you want to delete.
  4. Select Delete from the Edit menu or from the table's context menu.
  5. Click Yes in the Confirm Delete message box. The table is deleted.

Viewing Table Data in SAS OLAP Cube Studio

In SAS OLAP Cube Studio, you can view the underlying data of the tables that are available to build SAS OLAP cubes with. Tables are listed under the Tables node on the Inventory tab of the Tree View. You can view the underlying data for a table by selecting View Data from the Actions menu or from the table's context menu.
Note: For further information about managing tables see “ Managing Table Metadata” in the SAS Intelligence Platform: Data Administration Guide.