Using the Promotion Tools |
Description of Scenario |
In this example, a set of objects has been developed in Environment 1 and will be promoted to a different metadata server in Environment 2. The objects to be promoted are as follows:
a report called Sales by Customer Type
a report called Sales by Product Type
a stored process called Sales Analysis
an information map called Customer Orders
an information map called Product Sales
a library called Orion Data
three SAS tables: CUSTOMER_DIM, PRODUCT_DIM, and ORDERS_FACT
The metadata for the library, the tables, and the information maps is stored in the location SAS Folders\Shared Data\Orion Star Data, as shown here:
The metadata for the reports and the stored process is stored in the location SAS Folders\Shared Reports\Orion Star Reports, as shown here:
Note: This example scenario uses SAS Management Console to perform the promotion. If you use SAS Data Integration Studio or SAS OLAP Cube Studio, the procedure is the same except where noted.
Before promoting these objects, it is important to understand their associations with one another, as well as their associations with other objects and entities that do not appear in the tree. The following table describes these associations. It also describes the preparatory actions that must be taken in the target environment to ensure that the associations are restored following the promotion.
Metadata Object or Folder Name | Associated Objects or Content in the Source Environment | Action Needed to Prepare the Target Environment |
---|---|---|
Orion Star Reports folder | Reports_ A ACT |
Create the Reports_A ACT.
Set up the user groups that the ACT refers to. |
Sales by Customer Type report |
Sales by Customer Type.srx file
(on SAS Content Server) |
Ensure that a SAS Content Server exists. |
Customer Orders information map | None | |
Sales by Product Group report | Sales by Product Group.srx file | Ensure that a SAS Content Server exists. |
Product Sales information map | None | |
Sales Analysis stored process | None | |
Orion Star Data folder | Data_ A ACT |
Create the Data_A ACT.
Set up the user groups that the ACT refers to. |
Sales Analysis stored process | Analysis.sas source file | Set up a source code directory in the file system, and apply appropriate permissions. |
Source file repository definition | Ensure that a workspace server exists. | |
Stored process server | Ensure that a stored process server exists. | |
Orion Star library | CUSTOMER_DIM, PRODUCT_DIM, and ORDER_FACT tables | Identify a physical location for the library. |
CUSTOMER_DIM, PRODUCT_DIM, and ORDER_FACT tables | Physical tables | None |
These associations include the following:
The Orion Star Reports folder and the Orion Star Data folder are each associated with an ACT. If the export and import operations include access controls, then the Import SAS Package wizard will expect to find the ACTs already present in the target metadata server.
Each of the reports is associated with an XML file (with the suffix .srx) on the SAS Content Server. For these to be promoted, the Import SAS Package wizard will expect a SAS Content Server to exist in the target environment.
Each of the reports is associated with a different information map. The information maps must be promoted along with the reports in order for the reports to function properly.
Each of the information maps is associated with specific tables. The table metadata must be promoted along with the information maps in order for the information maps to function properly. The physical tables must also be promoted, or must already exist in the target environment.
One of the reports is associated with a stored process. The stored process must be promoted in order for the report to function properly.
The stored process is associated with a source code file that is stored on the file system. For this to be promoted, the Import SAS Package wizard will expect a source code repository to exist on the target application server.
The stored process is associated with a SAS Application Server and a source code repository definition. The Import SAS Package wizard will prompt you to establish an association between the stored process and both an application server and a source code repository definition in the target environment. If the source code repository definition does not exist, the wizard will enable you to add it.
Prerequisite Actions |
In the example steps that follow, it is assumed that the following preparatory actions have already been completed:
The following physical items must be created (or already present) in the target environment:
a SAS Content Server
a file path for the source code file for the stored process
physical tables that correspond to the tables in the source environment (or file paths for these tables, if they are being exported along with the metadata)
The following metadata must be created (or already present) on the target metadata server:
ACTs that correspond to, and have the same names as, the ACTs on the source metadata server
user group definitions for the groups that the ACTs refer to
a server definition for the SAS Content server
an application server definition that includes a stored process server and a workspace server
Step 1: Export the Folders and Objects |
For the scenario that is described in the previous topics, you would follow these steps to export the folders and objects from the source environment. These steps assume that you have already completed all of the preparatory actions that are described in the preceding section.
Open SAS Management Console, and connect to the source metadata server (that is, the metadata server from which you want to promote the folders and objects).
Select the Folders tab. (This step is not necessary in SAS Data Integration Studio or SAS OLAP Cube Studio.)
Right-click the SAS Folders node, and click Export SAS Package. (In SAS Data Integration Studio or SAS OLAP Cube Studio, you would right-click the folder that contains the objects that are to be exported.)
On the first Export SAS Package page, complete the following steps:
Enter a name for the SPK file that will contain the exported objects. The default name is Package1.spk.
Click Browse, and navigate to the location on the file system where you want the SPK file to be saved. For convenience, you might want to choose a location that will be accessible from the target environment.
Click Include dependent objects when retrieving initial collection of objects, as shown in the following example. This option helps ensure that all objects on which the exported objects depend are included in the export operation.
Note: On this page, you can also click Filter to select objects based on the object name, the object type, or the time period during which the object was created or last modified. (This scenario does not use the filter feature.)
Click Next.
On the next Export SAS Package page, do the following:
Select or clear the appropriate check boxes to specify which folders and objects are to be exported, as shown here. Be sure to select the folders whose access controls you want to promote.
Highlight each information map, report, and library object that you have selected. As you highlight each object, view the Dependencies tab to ensure that you have included the objects that the highlighted object depends on.
In the preceding example, the report Sales by Product Group is highlighted. The Dependencies tab lists the Product Sales information map and the Sales Analysis stored process, which are used by this report. Both objects have been selected to export.
Note:
If you press the CTRL key and highlight multiple objects, the Dependencies tab displays dependencies for all of the highlighted objects.
Dependencies are identified and displayed only for the objects that are initially selected on this wizard page. If you click Next to go to the next wizard page, and then you later return to this page and select additional objects, the wizard does not identify the dependencies for the additional objects.
Highlight each of the table objects, and use the Options tab to specify whether the associated physical table is to be exported with the metadata.
In the following example, the CUSTOMER_DIM table is highlighted. On the Options tab, the Include/replace physical table check box has been selected to indicate that the physical table is to be included in the export.
Note:
If you choose the option to export physical tables, you should be aware that large data sets could require lengthy processing times (since data sets are packaged in the SPK file along with the metadata).
If you press the CTRL key and highlight multiple objects of the same type, the Options tab enables you to select options for all of the highlighted objects.
After you have selected all of the appropriate metadata objects, dependencies, and options, click Next.
The next Export SAS Package page displays a list of the objects and folders that you selected. If the list is correct, click Next.
As the export process begins, the wizard might display a prompt asking you to log on to the SAS Application Server. Be sure to log on as a user who has the appropriate credentials (see Requirements for Accessing a Standard Workspace Server). If you are already logged on to SAS Management Console, SAS Data Integration Studio, or SAS OLAP Cube Studio with the correct credentials, then the prompt does not appear.
When the export process finishes, a log with a date-and-time stamp is saved in your user directory and a message like the following is displayed:
If errors or warnings are present, you can click View Log to view explanatory messages. For assistance in resolving errors, see Troubleshooting the Promotion Tools.
Note: For complete step-by-step instructions for using the Export SAS Package wizard, see the product Help for SAS Management Console, SAS Data Integration Studio, or SAS OLAP Cube Studio.
Step 2: Import the SPK File |
Follow these steps to import the folders and objects from the SPK file into the target environment. These steps assume that you have completed step 1 and that no errors occurred. These steps also assume that you have completed all of the preparatory actions.
Locate the SPK file that was created by the Export SAS Package wizard. If necessary, copy it, move it, or e-mail it to a location that is accessible from the target environment.
Open SAS Management Console, and connect to the target metadata server (that is, the metadata server to which you want to promote the folders and objects).
Select the folder under which you want to import the folders and objects.
Right-click to display the menu, and click Import SAS Package.
On the first Import SAS Package page, complete the following steps:
Click Browse, and navigate to the SPK file that contains the folders and objects.
Click Include access controls. This option will retain the associations that have been established between folders and ACTS.
Click the All Objects radio button. This will cause the imported objects to overwrite any objects of the same name that already exist.
Note: If you do not want to overwrite objects that already exist, then you would click New Objects Only.
Click Next.
The next Import SAS Package page displays a tree which shows the objects that are included in the package.
On this page, you can highlight the table objects, and then use the Options tab to indicate whether the physical tables are to be imported along with the metadata. You can also edit the table names. (These options are available only if you exported the physical tables.)Then click Next.
The next Import SAS Package page provides advance information about the metadata values that you will need to select on subsequent windows. For this scenario, you will need to select values for an application server, a library directory path, and a source code repository. Click Next.
In the Target column of the next page, select the application server that the imported objects will be associated with in the target environment.
Click Next.In the Target column of the next page, select the path where the source code file for the stored process should be stored in the target environment. (If the source code repository definition does not yet exist, then click Add to create it.) Then click Next.
In the Target column of the next page, enter (or browse to) the path where the library is to be located in the target environment. Then click Next.
The next page displays a list of the objects that will be imported. The metadata associations for these objects, both in the source environment and the target environment, are also listed. If the information is correct, click Next.
As the import process begins, the Import SAS Package wizard might display a prompt asking you to log on to the SAS Application Server. Be sure to log on as a user who has the appropriate credentials (see Requirements for Accessing a Standard Workspace Server). If you are already logged on to SAS Management Console, SAS Data Integration Studio, or SAS OLAP Cube Studio with the correct credentials, then the prompt does not appear.
When the import process finishes, a log with a date-and-time stamp is saved in your user directory, and a message like the following is displayed:
If errors or warnings are present, you can click View Log to view explanatory messages. For assistance in resolving errors, see Troubleshooting the Promotion Tools.
Note: The preceding steps are for the example scenario. Additional wizard pages might appear, depending on the types of objects you are promoting. For complete step-by-step instructions for using the Import SAS Package wizard, see the product Help for SAS Management Console, SAS Data Integration Studio, or SAS OLAP Cube Studio.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.