METALIB Procedure

Results: METALIB Procedure with the REPORT Statement

Introduction

By default, regardless of whether you specify the REPORT statement, the METALIB procedure writes a summary to the SAS log of changes that were made to the metadata. Here is an example:
NOTE: A total of 10 tables were analyzed for library "mylib".
NOTE: Metadata for 2 tables was updated.
NOTE: Metadata for 0 tables was added.
NOTE: Metadata for 7 tables matched the data sources.
NOTE: 1 other tables were not processed due to error or UPDATE_RULE.
If you specify the REPORT statement, a detailed report is written to the SAS Output window. The report provides the same summary as the SAS log, and also lists the changes to tables and their Column, ForeignKey, Index, KeyAssociation, and UniqueKey objects.
Some procedure arguments add information to the report.
  • If you specify UPDATE_RULE=(DELETE), the report lists the number of table definitions that were deleted from metadata.
  • If you specify the SELECT or EXCLUDE statement, the report lists the number of tables that were not found in either source (data source or metadata).
  • If you specify MATCHING in the REPORT statement, the report lists the tables that match the metadata.
  • If you specify TYPE=DETAIL in the REPORT statement, and you specify the IMPACT_LIMIT statement, the report lists the number of tables that were not processed because of large impact. It also lists Job and Transformation objects that are directly related to the table that is being processed.
If you specify the NOEXEC statement, the procedure does not make any of the changes to the metadata. The SAS log and Output window summarize the metadata changes that would have been applied if NOEXEC had not been specified.
For information about REPORT statement syntax, see REPORT Statement.

Output Format

The default report destination in SAS 9.3 is HTML.

Details in the Report

The METALIB procedure updates the attribute values of the table definition and the attribute values of associated objects to match the data in the specified SAS library, and then produces a report. Most of the report is self-explanatory. Here is more information about two of the columns in the report:
SAS Name
is the SAS name of the item described by the metadata.
  • For an index, this value is the IndexName= attribute.
  • For a column, this value is the SASColumnName= attribute.
  • For a non-primary unique key, this value is a two-part identifier in the form SASTableName.data-source-key-name.
  • For a primary unique key, this value is a two-part identifier in the form SASTableName.Primary.
  • For a foreign key, this value is a two-part identifier in the form primary-table-SASTableName.foreign-table-SASTableName.
Change
is a system-generated description of the change that was made. The description can be a single word, such as “Added” or “Deleted”, or it can be an attribute name (which indicates that the attribute's value was modified). It can be a “Column” or a “Column Order” message, followed by the name of the column that was affected by the change. PROC METALIB changes a table's Columns association to make the metadata column order match the data source column order. Affected columns are listed separately in the report. The column order in the report indicates the new metadata column order.