Importing, Exporting, and Promoting Metadata

About Importing, Exporting, and Promoting Metadata

SAS IT Resource Management metadata objects are managed as all other SAS metadata objects are managed. The SAS Intelligence Platform provides several tools to assist you in copying, promoting, importing, and exporting your metadata. For information about how metadata can be managed, see the “Using the Promotion Tools” chapter in the SAS Intelligence Platform: Data Administration Guide.
Note: SAS IT Resource Management does not support the exporting or importing IT data marts that contain duplicate named items, even if those items are in different folders. If you want to export (and then import) IT data marts that contain duplicate items, you should first export (and then import) the IT data mart without including its dependent objects. After that, as subsequent steps, you can export (and then import) each separate first-level subfolder including its dependent objects.

About Promoting an IT Data Mart

The IT data mart object is unique to SAS IT Resource Management and enables you to perform actions on the whole IT data mart. One of these actions is the ability to promote the IT data mart by means of the import and export tools. These tools can be used to promote IT data marts that were created in SAS IT Resource Management 3.2 and later to a new IT Resource Management environment. They enable you to move the definition of an IT data mart from one metadata server to another. For example, you might want to move (or promote) an IT data mart for one of the following reasons:
  • to move an IT data mart from a test system to a production system
  • to move an IT data mart to a new server when the original host is being replaced by new or different hardware
    Note: Both servers must be SAS 9.3 servers.
  • to share an IT data mart within or across an organization
  • to share user-written or customized adapters across IT data marts or IT Resource Management systems
You can perform the exporting and importing of an IT data mart in two ways:
  • interactively, using the Export SAS Package and Import SAS Package wizards
  • in batch mode from an operating system command line or from a batch script. The tools that run in batch mode provide the same capabilities as the Export SAS Package and Import SAS Package wizards, with the following exceptions:
    • The wizards provide the option of either including or excluding associated physical content such as table data and source code files. When you use the batch tools, the promotion automatically includes all associated content except physical files for tables and external files. (The batch tools do not provide the option of promoting physical files for tables and external files.)
    • In the export wizard, you can display a list of the objects on which an object depends and then individually specify which of these objects to export. In the batch export tool, you can select a global option to include all dependent objects.
    Note: For information about using the batch export and import tools, see the topic called “About the Batch Export and Import Tools” (http://support.sas.com/documentation/cdl/en/bisag/63132/HTML/default/viewer.htm#n13lro0e98gxu1n1rc3k9vgcz7h0.htm). This topic can be found in the SAS Intelligence Platform: System Administration Guide.
To determine which view of the SAS IT Resource Management client to use to perform the export and import functions, follow these guidelines:
  • If you are exporting and importing an IT data mart, perform both of those functions from the IT Data Mart view of the SAS IT Resource Management client.
  • If you are exporting and importing any of the subfolders or contents of an IT data mart, perform both of those functions from the IT Data Mart view of the SAS IT Resource Management client.
  • If you are exporting and importing any other content, that is, content that is outside of an IT data mart, perform both of those functions from the Folders view of the SAS IT Resource Management client.

How to Export an IT Data Mart Using the Export SAS Package Wizard

To export an IT data mart using the SAS Export Package wizard, perform the following steps:
  1. In the IT Data Marts tree, navigate to the IT data mart that you want to move.
  2. Right-click the IT data mart and select Export SAS Package.
    The first page of the Export SAS Package Wizard appears.
    First Page of the Export SAS Package Wizard
    First Page of the Export SAS Package Wizard
  3. In the Specify a package to contain the collection of objects that you are exporting field, you can accept the default location. The package is called Packagenn.spk, where nn is a number that is incremented by the value “1” each time the wizard is invoked.
    Alternatively, click Browse to navigate to another location. Select the location that you want to use and click OK.
    In addition, if you want to include all the contents of the IT data mart, make sure that Include dependent objects when retrieving initial collection of objects is checked.
  4. On the Select Objects to Export page, all the contents of the selected IT data mart are selected. You can deselect any items that you do not want to export.
  5. The Summary page displays the objects that will be included in the SAS package. When you are satisfied with your selections, click Next to export the IT data mart and its selected objects.
    Click View Log to see the log file that was created during the export process.
  6. Click Finish to return to the IT Data Marts tree.

How to Import an IT Data Mart Using the Import SAS Package Wizard

CAUTION:
Import into the IT Data Mart view only those objects that were exported from the IT Data Mart view.
If the exported IT data mart contains any staging jobs whose rawdata input is a database, the Import wizard might require you to select a library to which the exported library can map. If the library that points to the input database is located within the IT data mart that is being promoted, then you will not be required to specify a new library definition.
In addition, if the exported IT data mart contains any staging jobs whose rawdata input is a database, the Import from SAS Package wizard will require you to select a database server definition. This database server is associated with the library that is specified on the staging job as rawdata. If you want to work with a database server definition that does not exist, you must create one. For information about how to register a database server, see the “Connecting to Common Data Sources” topic in the SAS Intelligence Platform: Data Administration Guide.
Tip
If you need to specify either a library or a database server, do so before you invoke the Import from SAS Package wizard.
For best results, make sure that the name of the IT data mart that you are importing is unique within the metadata server. If the metadata server already contains an IT data mart with the same name as the one being imported, the name of the IT data mart is automatically changed to “Copy of <original-name>” or, if that name is already in use, “Copy n of <original-name>” .
Note: You might be importing the IT data mart to a machine that is running a different version of SAS IT Resource Management from the one where the source data mart resides. Similarly, you might be importing the IT data mart to a different machine from the one where the source IT data mart resides. In either case, any deployed jobs within the imported data mart on the target system should be deleted and then deployed again. You should not redeploy them.
To import an IT data mart using the SAS Import Package wizard, perform the following steps:
  1. Right-click in the white space of the IT Data Marts tree, and select Import SAS Package. The first page of the Import from SAS Package Wizard appears.
    First Page of the Import SAS Package Wizard
    First Page of the Import SAS Package Wizard
    Note: If you have selected an IT data mart, the Import SAS Package selection is not available. The Import SAS Package selection is available only if an IT data mart has not been selected.
  2. On this page, you can accept the default location, which is the location of the most recent exported SAS package.
    Alternatively, click Browse to navigate to another SAS package. Select the SAS package that you want to use and click OK.
    CAUTION:
    Import IT data marts only into a Foundation repository.
    Importing an IT data mart into a repository that is not Foundation causes processing errors.
    You can also choose the following options:
    • include the access controls. These access controls govern which users or user groups can access the imported IT data mart.
    • import all objects in the selected SAS package. This option causes objects that exist in the destination IT data mart to be overwritten.
    • import only new objects in the selected SAS package. This option imports only those objects that do not exist in the destination IT data mart.
  3. On the second page of the wizard, you can select the objects that you want to import. All items in the SAS package are selected by default. You can deselect those items that you do not want to import.
    Select the Objects to Import
    Select the objects to import
  4. The next page of the Import from SAS Package Wizard displays a note that explains that you might need to create metadata definitions for some of the objects that you want to import. For example, if this package contains a table but does not contain a library for that table, then a library for that table must already exist in metadata before importing the table metadata. (If the table and the library containing the table are both in the package, as they normally would be, you do not need to do anything.) If you need to do so, you can create a new library definition with the New Library wizard.
    To access the New Library wizard from the SAS IT Resource Management client menu bar, select Filethen selectNewthen selectLibrary. Respond to the prompts of the wizard as needed. In addition, some adapters (such as MS SCOM, SNMP, or VMware) have a raw data source that is a database. If an IT data mart contains that type of adapter, then a database server definition must be created that points to that database. For information about how to create a database server definition, see the “Overview of Common Data Sources” chapter in SAS Intelligence Platform: Data Administration Guide at http://support.sas.com/documentation/onlinedoc/intellplatform/index.html. In the topic that discusses your database, you can find the section called “Register the Database Server.”
  5. The next page of the wizard prompts you to specify the target application server to which you are importing the IT data mart.
  6. The Directory Paths page shows the target locations for the folders of the IT data mart that is being imported.
    Select Target Directory Paths for IT Data Mart Objects
    Select Target Directory Paths for IT Data Mart Objects
    You can accept the default target locations, or you can click the ellipsis (...) to open the Browse dialog box. When you have selected the new target location, click OK.
  7. The Summary page displays the choices that you specified. Click Next to import the IT data mart and the objects that you specified.
  8. When the IT data mart has been imported, the Import Complete page is displayed. Click View Log to see the log file that was created during the import process.
  9. Click Finish to return to the IT Data Marts tree.
  10. Use your file system management tools to copy the physical files that are associated with the IT data mart from the source to a location on the target server that is to be referenced from the IT data mart. For more information, see SAS IT Resource Management: Migration Documentation.

Handling Out of Memory Problems in an Export Operation

If you try to export a large IT data mart, your client machine might run out of memory. If this happens, you can export the IT data mart in two or more parts.
To import all the exported packages, you must invoke the Import SAS Package wizard multiple times. However, you must avoid importing duplicate objects because that results in a corrupted IT data mart and orphaned objects. The first page of the Import SAS Package wizard provides options that enable you to prevent this problem. Perform the following steps:
  1. For the first exported package, select the option to Import All objects.
  2. For all the other exported packages, select New Objects Only as shown in the following display.
    Import New Objects Only
    Import New Objects Only

Correcting Formulas for Computed Columns after Importing an IT Data Mart

If the staged or aggregated tables of the IT data mart that you imported contain computed columns that use formulas, you need to re-establish those formulas. The expression syntax will be correct, but if you want future changes to the formula to be reflected in each column that uses it, the link to the formula must be re-established. To do so, perform the following steps for each table that contains the computed column:
  1. Open the job that contains the table in the Diagram tab of the Job Editor window.
  2. Right-click the table that contains the computed column to open the Properties dialog box.
  3. Select the Columns tab to open a grid that contains the list of columns and any expressions that are associated with them.
  4. Double-click the computed column to display an ellipsis (...). Click the ellipsis to open the Expression Builder window.
  5. The IT Formulas tab contains a list of supplied formulas and a list of user-defined formulas. Select the formula that applies to the computed column that you selected and click Insert. Then click OK to close the Expression Builder window and return to the Columns tab of the Properties dialog box.
Note: When all computed columns in the table are corrected, click OK to return to the job in the Diagram tab of the Job Editor window. When all the tables generated in the job have been corrected, save the job.