METALIB Procedure
Example 2: Synchronizing Metadata with the Data Source
Features: |
PROC METALIB
Default connection properties
OMR statement
UPDATE_RULE statement with DELETE argument
REPORT statement with MATCHING argument
|
This example adds, updates,
and deletes existing metadata describing the tables in a SAS library
in the SAS Metadata Repository to match the current physical tables
in the SAS library. Because this example does not specify connection
arguments for the metadata server, the procedure uses the values of
the METAPASS, METAPORT, METAREPOSITORY, METASERVER, and METAUSER system
options that are active for the SAS session.
Specify the data source. Specify
a SAS library that is already defined in the metadata. This example
specifies the same library that was in the previous example.
proc metalib;
omr (libid="AZ00000A");
Delete obsolete metadata. This
example deletes any table definition that does not correspond to a
table in the SAS library. The default actions of add and update are
also performed.
Create a report. The MATCHING
argument causes the report to include a list of tables whose metadata
matches the data source. If you do not specify the MATCHING argument
when synchronizing existing metadata, and if there has been no change
to the data source (which would result in adding, updating, or deleting
metadata), the REPORT statement returns only summary statistics.
This is the report
created in the
Output window.
Copyright © SAS Institute Inc. All rights reserved.