Previous Page | Next Page

Customizing the SAS/Warehouse Administrator Interface

Importing Column Metadata

The Columns tab on the Table Properties frame is used to define column metadata for ODDs, detail tables, and other tables. SAS/Warehouse Administrator lets you import column metadata from various sources, including SAS data sets and views, the supplied data location, ODDs, detail tables, PROC CONTENTS output, and COBOL file descriptors. You can also add your own list of import tools to the catalog entry SASHELP.DW.USERIMPT.SCL.

Select Edit [arrow] Import [arrow] Other from the pull-down menu or click Import and then select Other on the Columns tab to drive the first USERIMPT.SCL entry found in the search path. By default, SASHELP.DW.USERIMPT.SCL displays a message that says that there are no user-defined metadata import tools available. To replace this message with a list of your own tools, put your own entry in USERIMPT.SCL that points to the catalog entries for your tools. The recommended catalog.library for this new entry is _SASWA.DW.


Predefined Column Formats

Your column metadata import tools can be written to pass back a list of columns of a predefined format. SAS/Warehouse Administrator will convert that list into column metadata. This will allow you, for example, to define the metadata for a particular kind of detail table by selecting a user-defined tool from the Edit [arrow] Import [arrow] Other selection on the Edit menu or from the Other selection displayed by clicking Import.

To accomplish this, you must define the parameter l_addcols in the SCL source code for your metadata import tool. l_addcols will contain one or more sublists: one sublist for each column in the table you want to create. Each sublist must have the following format:

             (NAME=column-name                $8
              DESCRIPTION=column-description  $200
              TYPE=column-type                $1 (C or N)
              LENGTH=column-length            8 (positive integer)
              FORMAT=column-format            $32
              INFORMAT=column-informat        $32
             )

If your metadata import tool uses the l_addcols parameter to define a set of column formats, SAS/Warehouse Administrator will add this information to the column metadata displayed on the Columns tab.

The only named item required in the column sublist is NAME.

NAME must be a valid SASNAME, 1 to 32 characters in length. If the NAME named item is not on the column sublist, an error message will be displayed and that column sublist will be ignored. However, SAS/Warehouse Administrator will continue trying to add the other columns in the l_addcols .

If the name supplied is a duplicate of a name already registered in column metadata, the "Duplicate Name" dialog box will be displayed asking for a different name for the column.

Processing will continue after a valid name is provided or that column will not be added if CANCEL is selected on the dialog box.

If DESCRIPTION, FORMAT, and INFORMAT are not provided, they will be defaulted to _BLANK_. If TYPE is not provided, it will default to C. If LENGTH is not provided, it will default to 8 if type is N or 200 if type is C.

If the TYPE specified is not a valid value (C or N), the default C will be used. If the LENGTH specified is not a valid length (positive integer), the type-dependent default will be used.

Previous Page | Next Page | Top of Page