One of the most challenging and time consuming aspects to an upgrade or migration project is validating the post-upgrade environment. One of the first concerns of an administrator is to ensure that all of the content from the source environment made it to the target environment. In the past, this concern has given rise to innumerable bespoke programs to comb through metadata looking for changes. This post will show how an administrator can use the SAS 9 Inventory to compare contents before an upgrade to contents after an upgrade to identify differences in content.
SAS 9 Inventory is part of the SAS 9 Content Assessment which is a freely available collection of applications designed to examine the characteristics of a SAS 9 system. While this post will use only the SAS 9 Inventory, you can view Ajmal Farzam's demonstration video of the complete set of SAS 9 Content Assessment applications on YouTube.
The feature of SAS 9 Inventory that makes it quite useful for validation purposes is being able to
For this post, I am going to use SAS 9 Inventory to identify content differences after an upgrade-in-place from SAS 9.4 M5 to SAS 9.4 M7. But bear in mind that this same technique could be used just as easily to validate a migration or promotion project.
The workflow for this exercise is to
After downloading SAS 9 Content Assessment to the source environment, I had to edit metaparms.sas and setenv.yaml before running SAS 9 Inventory. Notice that in metaparms.sas I am using the METADATALABEL to label the results in the datamart as "PreUIP".
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
I then ran SAS 9 Inventory which connected to the SAS Metadata Server and searched for contents in the source system. Looking in the datamart directory below the SAS 9 Content Assessment installation directory, I can see that the results of SAS 9 Inventory are stored in ./datamart/inventory/PreUIP.
[sas@sasserver datamart]$ ls -alFR .: total 12 drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ./ drwxr-xr-x. 14 sas sas 4096 Nov 30 10:43 ../ drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 inventory/ ./inventory: total 12 drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ./ drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ../ drwxr-xr-x. 2 sas sas 4096 Nov 30 10:43 PreUIP/ ./inventory/PreUIP: total 5156 drwxr-xr-x. 2 sas sas 4096 Nov 30 10:43 ./ drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ../ -rw-rw-r--. 1 sas sas 4063232 Nov 30 10:43 all_objects.sas7bdat -rw-rw-r--. 1 sas sas 655360 Nov 30 10:43 deploymentinfo.sas7bdat -rw-rw-r--. 1 sas sas 917504 Nov 30 10:43 licenseinfo.sas7bdat
The next step is to upgrade the deployment to SAS 9.4 M7.
Even though I am using the same machine and the SAS 9 Content Assessment configuration I used earlier would still work, I need to modify metaparms.sas to make sure my next run of SAS 9 Inventory is labeled differently. In this case, I have changed the METADATALABEL to PostUIP to separate the results from the previous run.
After running SAS 9 Inventory against the post-upgrade environment, I now see that the SAS 9 Content Assessment datamart directory contains a second collection of result tables in ./datamart/inventory/PostUIP.
[sas@sasserver datamart]$ ls -alFR .: total 12 drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ./ drwxr-xr-x. 14 sas sas 4096 Nov 30 16:59 ../ drwxr-xr-x. 4 sas sas 4096 Nov 30 16:59 inventory/ ./inventory: total 16 drwxr-xr-x. 4 sas sas 4096 Nov 30 16:59 ./ drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ../ drwxr-xr-x. 2 sas sas 4096 Nov 30 16:59 PostUIP/ drwxr-xr-x. 2 sas sas 4096 Nov 30 10:43 PreUIP/ ./inventory/PostUIP: total 4612 drwxr-xr-x. 2 sas sas 4096 Nov 30 16:59 ./ drwxr-xr-x. 4 sas sas 4096 Nov 30 16:59 ../ -rw-rw-r--. 1 sas sas 4194304 Nov 30 16:59 all_objects.sas7bdat -rw-rw-r--. 1 sas sas 655360 Nov 30 16:59 deploymentinfo.sas7bdat -rw-rw-r--. 1 sas sas 229376 Nov 30 16:59 licenseinfo.sas7bdat ./inventory/PreUIP: total 5156 drwxr-xr-x. 2 sas sas 4096 Nov 30 10:43 ./ drwxr-xr-x. 4 sas sas 4096 Nov 30 16:59 ../ -rw-rw-r--. 1 sas sas 4063232 Nov 30 10:43 all_objects.sas7bdat -rw-rw-r--. 1 sas sas 655360 Nov 30 10:43 deploymentinfo.sas7bdat -rw-rw-r--. 1 sas sas 917504 Nov 30 10:43 licenseinfo.sas7bdat
The next step is to run SAS 9 Publish Assessment which is another application in SAS 9 Content Assessment that will
./publishAssessment --datamart-type inventory --va75
Re-examining the SAS 9 Content Assessment datamart directory after running the publishAssessment command, I can see new tables in the inventory directory which are the merged results from the PreUIP and PostUIP directories. These are the tables that are loaded into the LASR server for viewing in Visual Analytics.
[sas@sasserver assessmentTool]$ ls -alFR ./datamart ./datamart: total 12 drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ./ drwxr-xr-x. 14 sas sas 4096 Nov 30 17:03 ../ drwxr-xr-x. 4 sas sas 4096 Nov 30 17:03 inventory/ ./datamart/inventory: total 10216 drwxr-xr-x. 4 sas sas 4096 Nov 30 17:03 ./ drwxr-xr-x. 3 sas sas 4096 Nov 30 10:43 ../ -rw-rw-r--. 1 sas sas 7995392 Nov 30 17:03 all_objects.sas7bdat -rw-rw-r--. 1 sas sas 1310720 Nov 30 17:03 deploymentinfo.sas7bdat -rw-rw-r--. 1 sas sas 983040 Nov 30 17:03 licenseinfo.sas7bdat drwxr-xr-x. 2 sas sas 4096 Nov 30 16:59 PostUIP/ drwxr-xr-x. 2 sas sas 4096 Nov 30 10:43 PreUIP/ -rw-rw-r--. 1 sas sas 589824 Nov 30 17:03 sas_9_types_v5.sas7bdat ./datamart/inventory/PostUIP: total 4612 drwxr-xr-x. 2 sas sas 4096 Nov 30 16:59 ./ drwxr-xr-x. 4 sas sas 4096 Nov 30 17:03 ../ -rw-rw-r--. 1 sas sas 4194304 Nov 30 16:59 all_objects.sas7bdat -rw-rw-r--. 1 sas sas 655360 Nov 30 16:59 deploymentinfo.sas7bdat -rw-rw-r--. 1 sas sas 229376 Nov 30 16:59 licenseinfo.sas7bdat ./datamart/inventory/PreUIP: total 5156 drwxr-xr-x. 2 sas sas 4096 Nov 30 10:43 ./ drwxr-xr-x. 4 sas sas 4096 Nov 30 17:03 ../ -rw-rw-r--. 1 sas sas 4063232 Nov 30 10:43 all_objects.sas7bdat -rw-rw-r--. 1 sas sas 655360 Nov 30 10:43 deploymentinfo.sas7bdat -rw-rw-r--. 1 sas sas 917504 Nov 30 10:43 licenseinfo.sas7bdat
The next step is to open the SAS 9 Inventory report and look for differences between the two result sets. If you are not a member of the SAS Administrators group you will need to be added to the SAS Inventory Users group to open the report.
When you publish multiple inventory results, the SAS 9 Inventory report has a button bar across the top of the report that allows you to filter results for a single result set. So let's take a look at the PreUIP data first. Here we can see that there are 36 total Business Intelligence objects in the PreUIP deployment with 30 of those being Visual Analytics objects.
Let's compare these results with the PostUIP data. Selecting the PostUIP button displays contents from the updated environment and we do see that there is one less Visual Analytics object.
So the next question is, how can I determine exactly what the difference is?
A quick and easy way to identify actual differences between result sets is to
Repeating the same steps but filtering for PostUIP before exporting the records then yields two CSV files: one with PreUIP BI content and the other with PostUIP content.
Now I can use my difference tool of choice to compare the two files.
In this instance, we can see (in blue) the extra item in the PreUIP content is just a sample provided by SAS that is not included in SAS 9.4M7 so I can ignore the difference. Notice that this report also identifies three Visual Explorations that were converted to Visual Analytics reports (highlighted in yellow). This is due to a change between SAS 9.4M5 and SAS 9.4M7 which did away with the Visual Exploration object.
If there are other differences in the SAS 9 Inventory report we can simply repeat this process, filtering for object types of interest. We could, of course, dump all object types at once but that may get unwieldy if your environments have a lot of content.
Given the challenge of validating an upgrade or migration, the SAS 9 Inventory can at least help quantify difference between two or more deployments. Knowing where differences occur should help focus your investigation into whether or not the difference is of a material concern. So whether you are doing an upgrade-in-place, a promotion of selected content, or a full on migration, consider including the SAS 9 Inventory in your post-upgrade validation plans.
Thanks for sharing the details. This looks promising, although the strong adherence to VA for rendering the results is still a pain point in my opinion. The doc specifies that Data Sets are created with UTF-8 encoding, thus preventing non utf8 SAS 9 sessions to load it, I guess.
_ Would it be feasible in a future release to change the default UTF8 encoding with another fixed-length charset (Latin9 etc.) ?
This would enable the comparison to take place within a standard SAS 9 session (proc compare ...).
Thank you, @ScottMcCauley . Of course, some metadata store localised, which means translated into non-English languages - user information. However, this situation doesn't occur systematically and most localised charsets have fixed-length (Single Byte) except - to the best of my knowledge - in Asia where UTF8 is required for Multi-Bytes characters (Hanzi, Kanji etc.). Therefore, knowing that SAS 9 with fixed-length charset (non UTF8) is rather the norm than the exception, I think that adjusting to this case could be very beneficial. Setting up a UTF8 SAS 9 session is quite demanding and implies in most deployments to configure another Logical Server only for this very purpose : this would drastically limit the scope of the tables generated by the Inventory report, which looks incredibly useful :).
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.