This post was kindly contributed by The SAS Dummy - go there to comment and to read the full post. |
We sometimes take it for granted, but the concept of the “SAS library” is just about one of the most awesome aspects of The SAS System.
You can give your library a name (a library reference, or libref), tell the system how to get to your data (options on a LIBNAME statement), and then build your SAS process to reference the contents of that library. Over time, you can change where your data is: put it in the file system, share it on a remote server, load it into DBMS. It doesn’t matter; as long as the contents of the library have the same table names and column names/types, your SAS programs still work.
The SAS library definition (issued via a LIBNAME statement) tells your SAS programs how to get to the physical data. But these days, many SAS processes rely increasingly on metadata. Why is that? Among the reasons:
- Accessing the physical data is expensive, in terms of I/O processing. Metadata can tell you about available data sources without expensive queries to the database.
- Metadata is critical for building robust ETL processes and understanding impact of changes to downstream outputs (Example: “what reports are impacted if I change the name of this column?”). (You typically use SAS Data Integration Studio for this work.)
- Metadata is easier to “secure”, allowing you to assign privileges for users and groups to see only what you want them to see about the available data sources. (You use SAS Management Console for this work.)
- Metadata can be used to “repackage” your data sources and represent them in friendlier business views (using SAS information maps, for example) without the expense of keeping multiple copies of the same data.
As important and flexible as it seems, the use of a metadata layer can present challenges to traditional SAS users who write programs or who use interfaces such as SAS Enterprise Guide to work with the data “closer to the metal”. When you access data, are you going directly to the physical data or are you navigating through a metadata layer? There are behavior differences that result from the different approaches. It’s important for SAS administrators to understand these behaviors so that they can provide the correct experience for the end users that they support.
Here are some resources to help. They answer the most common questions about metadata libraries, and provide guidance for how to get the behaviors that you want:
- What SAS Administrators Should Know about Libraries, Metadata, and SAS Enterprise Guide (SAS 9.2, SAS Enterprise Guide 4.2 & 4.3)
- What SAS Administrators Should Know about Libraries, Metadata, and SAS Enterprise Guide (SAS 9.1, SAS Enterprise Guide 4.1)
This post was kindly contributed by The SAS Dummy - go there to comment and to read the full post. |