SAS VA Auto Loading – for the experts

by | Nov 19, 2015

Some of you may recall I wrote a blog some time ago on SAS Visual Analytics auto load libraries. In that blog, I talked about using the autoload library that is created “out of the box” by SAS, here I am going to show you how to create additional autoload libraries if you want to separate your data for security or other reasons.
I have used Linux for this example, but it’s easy enough to change to Windows if that is your operating system.
Note: The order in which you do these things is not too important but feel free to follow along.

Operating system level changes

You will need to create a new set of physical folders. The first is where you will place your SAS tables to be loaded into memory, the next four sub-folders allow you to manage your tables.

  • /SASData/Autoloads/DataVault
  • /SASData/Autoloads/DataVault/Append
  • /SASData/Autoloads/DataVault/Formats
  • /SASData/Autoloads/DataVault/Logs
  • /SASData/Autoloads/DataVault/Unload

Next we will create the scripts used to load the tables into memory

  • Copy folder /SASConfig/Lev1/Applications/SASVisualAnalytics/VisualAnalyticsAdministrator/VALIBLA and all of it’s contents to a new folder in the same location called DV
  • Within the new folder you created edit and change the follow files as below
    • Autoload.sas     – Change the LASR library name to “Data Vault”
    • runsas.sh          – Change the libref to “DV
    • schedule.sh      – Change the libref to “DV
    • unschedule.sh  – Change the libref to “DV

Action in SAS Metadata

You need to create a new SAS LASR library. Use the wizard and enter the values below when requested.

  • Type of Library      – SAS LASR Analytic Server Library
  • Location                – Data Vault\LASR Data
  • Name                    – Data Vault
  • Server Tag            – DV (this must be unique, so I use the libref to keep it simple)
  • Libref                    – DV

Now update the properties for the LASR library, under the Extended Attributes tab change the following

  • change VA.Default.MetadataFolder             to Data Vault\LASR Data
  • change VA.AutoLoad.AutoStart                   to Yes
  • change VA.AutoLoad.Enabled                     to Yes
  • change VA.AutoLoad.Location                     to /SASData/Autoloads/DataVault
  • change VA.AutoLoad.Sync.Enabled            to Yes
  • change VA.AutoLoad.Sync.Import               to Yes
  • change VA.AutoLoad.Sync.Load                 to Yes
  • change VA.AutoLoad.Sync.Refresh            to Yes
  • change VA.AutoLoad.Sync.Append             to Yes
  • change VA.AutoLoad.Sync.Unload              to Yes
  • leave VA.AutoLoad.Debug.Enabled             as No
  • change VA.ReloadOnStart.Enable               to Yes
  • change VA.ReloadOnStart.TableDefault      to Yes
  • leave VA.ReloadOnStart.Method                 as All

Now lets turn it on

The last step is enablement. There is nothing special about this, all we need is a batch job to run every 15 minutes to load any new or updated tables into memory. Executing the schedule.sh job you edited earlier will add a batch job to the cron scheduler running every 15 minutes.
I have used a library name of Data Vault and a libref of DV for this example.
namespaces-and-autoloading-9-638
 
 
 
 
 
 
Hopefully, this will make your life easier as it has made mine.
Cheers,
Shane out
Shane blogs about the things only a SAS Administrator knows.
You can read Shane’s blog, Administrating SAS in a Linux environment, or all of Shane’s blogs here.
We run regular Agile courses with a business intelligence slant in both Wellington and Auckland. Find out more here.

2 Comments
  1. John

    This was a very useful and clear post – thanks!

    Reply
  2. Anandi

    Hi Shane,
    Can follow the same method even to set different time_interval_minutes parameter values for additional autoload folder?
    Thanks

    Reply
Submit a Comment

Your email address will not be published. Required fields are marked *