METALIB Procedure |
How PROC METALIB Works |
The procedure examines the data source (the SAS library) that is referenced by the SASLibrary object. Then the procedure examines the SAS table names in the data source and compares them to the values of the SASTableName= attributes in the metadata. For each SAS table name in the data source, the procedure checks the repository association list to see whether a matching table definition exists.
If a matching table definition does not exist, one is created.
If a matching table definition exists, it is updated to match the table in the data source.
If duplicate table definitions exist, only the first table definition is updated. The additional table definitions are ignored by default. If you specify UPDATE_RULE=(DELETE), the additional table definitions are deleted. If you specify UPDATE_RULE=(DELETE NODELDUP), the additional table definitions are not deleted.
If a table definition exists that does not correspond to a table in the data source, it is ignored by default. If you specify UPDATE_RULE=(DELETE), the table definition is deleted.
If a column name in a table definition matches the column name in the data source but is in a different case (for example, lowercase instead of uppercase), then the following change occurs in the table definition. If the data source is a SAS table or view, the column name in metadata is updated to match the case of the column name in the data source. If the data source is a DBMS, the column name in metadata is deleted and added to match the case of the column name in the data source. If the DBMS has column mappings in a SAS Data Integration Studio job, you might have to recreate the column mappings.
For more information, see topics about managing table metadata in the SAS Intelligence Platform: Administration Guide.
Note: The maximum length for index names that can be registered by PROC METALIB is 256 characters. However, other components of SAS or the DBMS might enforce a shorter length, causing the name to be truncated.
What Metadata Is Updated? |
The procedure updates all table definitions that are associated with the specified SASLibrary object. The affected metadata objects include PhysicalTable, Column, ForeignKey, Index, KeyAssociation, and UniqueKey. For more information about these metadata objects, see their descriptions in SAS Metadata Model: Reference.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.