SAS® Enterprise Guide For SAS® Visual Analytics LASR Server
SAS® Enterprise Guide For SAS® Visual Analytics LASR Server
ABSTRACT
®
It would be very helpful for SAS Enterprise Guide users if they can upload the data to LASR server
®
(SAS Visual Analytics) directly from process flow. To achieve this functionality user needs to be given
proper metadata access to load the table. For broader user, it becomes easy to manage the access, if we
can use Access Control Template (ACT) in management console. ACT can be created with appropriate
privileges and applied to the specific groups. This paper explains, how SAS Administrator can manage
® ®
SAS Visual Analytics environment for their SAS Enterprise Guide users, so that they can load the data
®
to LASR and can run SAS program. User can use SAS Enterprise Guide to create different kind of
reports from LASR tables.
INTRODUCTION
SAS Visual Analytics is one of the very powerful SAS analytical tools. It becomes even more powerful
when it reads unstructured data like Facebook, twitter etc. SAS Visual Analytics can read the social media
page and read the data in structural format. After getting the unstructured data in structural format, it can
be used by SAS user easily for further analytics.
Sometime, traditional SAS Enterprise Guide users prefer, if they can do most of the things from their SAS
session directly. If they are using SAS Enterprise Guide for SAS coding and they are generating data sets
in SAS session then these user may prefer to load data from SAS Enterprise Guide session only, instead
of SAS Visual Analytics Data Explorer window. Apart from loading data, SAS Enterprise Guide user can
read LASR tables and can perform different kind of analytics. Reading the LASR table to SAS Enterprise
Guide provides additional flexibility to read and analyze these tables especially for experienced SAS
users.
This paper contains the following key topics with respect to SAS Enterprise Guide with SAS Visual
Analytics- LASR:
1. Upload SAS Data Set from SAS Enterprise Guide to LASR Server
2. Register a table to SAS Metadata by using SAS Enterprise Guide
3. ACT for Register Table to SAS Metadata
4. Read LASR Data in SAS Enterprise Guide Session
Before talking about above mentioned points let’s discuss the benefits of using SAS Enterprise Guide with
SAS Visual Analytics.
1
etc…) from SAS Visual Analytics in structural format and then this structured data can be used in
base SAS coding for further analysis.
User can upload SAS data sets from SAS Enterprise Guide to LASR without navigating through
SAS Visual Analytics “Data Explorer” window. Otherwise, users need to save SAS data set and
use Data Explorer Window from SAS Visual Analytics to load SAS generated data to LASR.
LASR tables can be read into SAS session, so that SAS user can perform more analytics
compare to what is available in SAS Visual Analytics by default.
®
SAS Enterprise Guide can be used to load data manually to LASR and register to SAS
Metadata. There are many ways to register data set to SAS Metadata but it becomes very easy
and user friendly if user can generate data set in SAS Enterprise Guide and can register from
there itself.
1. UPLOAD SAS DATA SET FROM SAS ENTERPRISE GUIDE TO LASR SERVER
Users can upload the data to LASR from SAS Visual Analytics Data Explorer screen. As shown in below
screen print (display 2), click on “Select a Data Source” and then browse to the file which needs to be
loaded. If users don’t have any prior SAS coding experience then this method may be very helpful.
2
But, Data Explorer method may not be very helpful, if users are using SAS Enterprise Guide. Enterprise
Guide users would prefer to load the data to LASR from SAS Enterprise Guide session directly. This will
save the effort and time by saving the SAS data set and browse through SAS Visual Analytics Data
Explorer web page. To upload the table from Enterprise Guide session, we can follow the below given
steps:
1. From SAS Enterprise Guide process flow window, right click on the data set which needs to be
uploaded and select “Upload to LASR” task.
2. Select “Visual Analytics Public LASR” for Library and check the box for “Register data for use in
SAS Visual Analytics” checkbox. Then click on “Run”.
If we load the table to LASR server and above option in red box (display4) is unchecked then uploaded
table won’t be visible to SAS Visual Analytics “Data Explorer” window. In this case after loading the table,
3
it needs to be registered in SAS Metadata. In step 2 (display 4), we have checked the box to register
table, so that it automatically registers after loading the table (provided users have been given required
authorization to register table to SAS Metadata).
There are multiple ways to register the table to SAS Metadata. Next sub topics explain how we can
register table with SAS Enterprise Guide.
Below screen print shows the error from SAS log generated by “Upload to LASR” task in SAS Enterprise
Guide session. As shown below output, after completing the process of upload, it creates a report and
sometimes we see the below error during final report creation.
ERROR: The width of lbl is not between 1 and 132. Adjust the column width
or line size.
NOTE: This affects LISTING output.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 5 observations read from the data set
WORK.UPLOAD_LASR_SMP_REPORT.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
. . .
Actually “Upload to LASR” task creates a report to display that execution was successful.
WORK.UPLOAD_LASR_SMP_REPORT table contains the information to create the report. Below
screen print shows the properties of this data set. As shown in below properties, the width of lbl is 200
(more than 132 char).
Error and note (gray highlighted) are specific to report creation using the LISTING. It does not affect the
upload of the data to LASR. It affects only the creation of the report for the text output destination only.
This error can be removed by turning off the “Text Output” results format by going to Tools -> Options ->
Results General. Other way to remove this error is to increase the LINESIZE option so that it's greater
than the default of 132 by using OPTIONS statement in the SAS code before your execute the “Upload to
LASR” task.
4
2. REGISTER A TABLE TO SAS METADATA BY USING SAS ENTERPRISE GUIDE
As discussed in first topic, if we just upload data to LASR and do not register then it won’t be available in
SAS Visual Analytics to use. To make the data available in SAS Visual Analytics, we need to register the
table. In first topic we checked the box to register table and it registered the table immediately after
loading to LASR.
Below steps show how can we use SAS Enterprise Guide to register tables to SAS Metadata. We need to
follow below given steps in sequence:
1. From SAS Enterprise Guide window, click on “Tools” and select “Update Library Metadata”.
2. From “Update Library Metadata” screen1 select the library as “Visual Analytics Public LASR”. And
click on “Next”.
5
3. From “Update Library Metadata” screen2 select the action as “Update and add table definitions in
metadata with the actual tables and columns”. Then click “Finish”.
Note – Some time few metadata related actions are not allowed to all users with normal user access.
Above red rectangle shows, if user credential is not allowed to update metadata then SAS Administrator
can help with some generic credential to register table.
After registering the table to SAS Metadata it can be seen in SAS Visual Analytics LASR Table list, as
given below:
6
3. ACT FOR REGISTER TABLE TO SAS METADATA
If there are many users using SAS Enterprise Guide to upload table to LASR then it might be difficult for
administrator (e.g. human errors) to give appropriate authorization to each and every individuals. In such
scenario it is advisable to create Access Control Template (ACT) with required authorization and apply to
a group which contains all such users. Once ACT is created and applied to specific group, new users just
need to be added to this group. By adding users to the group, they will have all authorization to load and
register tables. This will help administrator to put one time effort and going forward users just need to be
added in this group.
For “Upload to LASR” task in SAS Enterprise Guide, user needs to have metadata permissions both in
roles, groups on metadata folders and library. For a user to upload a data set in a LASR library, they must
have ReadMetadata, WriteMetadata, WriteMemberMetadata, Read, Write, Create, and Delete
permissions on both LASR library object and the metadata folders in which those objects reside.
We can follow the below mentioned steps in sequence to create and apply ACT:
1. Create a group (in below example “EG User for LASR”) in SAS Management Console (all users
using SAS Enterprise Guide to upload tables to LASR, will be member of this group).
3. Apply ACT to the specified group. This will bring all the authorization associated with ACT to all
members of specified group.
7
Display 11. SAS Management Console – Group “EG User for LASR” Properties
4. Apply new ACT on the folders tab in SAS Management Console. Look at the Authorization tab of
the metadata folder /Shared Data/ SAS Visual Analytics/Public.
8
4. READ LASR DATA IN SAS ENTERPRISE GUIDE SESSION
For SAS users it becomes very easy if they can read the LASR table in SAS Enterprise Guide session as
SAS data sets. After reading as data sets, they can do further analysis which is not available in SAS
Visual Analytics by default. Apart from this SAS user can read unstructured data like Facebook and twitter
from LASR to SAS session where they can analyze further based on SAS coding expertise.
To read the LASR table in SAS Enterprise Guide session, users need to have library reference assigned
in SAS session. Once library is assigned, all tables can be viewed in SAS Enterprise Guide (Server ->
Libraries tree). Following steps need to performed to get the Libname definition from SAS Management
Console:
Data Library Manager -> Libraries then right-click on “Visual Analytics Public LASR” and select "Display
LIBNAME statement"
Display 14. SAS Management Console – Data Library Manager Libname Definition
Above Libname shows the location where all LASR tables reside. This Libname can be used like any
other regular library reference to read the table from. Below example shows how LASRLIB is being used
to read LASR tables. This library reference is bit different than other library reference in the way that if
you load table directly from base SAS code, these uploaded tables won’t be visible to SAS Visual
Analytics Data Explorer web page. To make the table visible in explorer window, these tables need to be
registered in SAS Metadata.
9
Below example demonstrate how we can read the table from LASR in SAS session and save in other
SAS library. Log shows that SAS uses SASIOLA engine to assign LASR library reference in SAS session.
SAS Code:
data baselib.bird_sample;
set LASRLIB.test_bird;
run;
. . .
24 LIBNAME LASRLIB SASIOLA TAG=VAPUBLIC PORT=10031
HOST="sas.xyz.com"
24 ! SIGNER="http://sas.xyz.com:7980/SASLASRAuthorization" ;
NOTE: Libref LASRLIB was successfully assigned as follows:
Engine: SASIOLA
Physical Name: SAS LASR Analytic Server engine on local host, port
10031
25
26 LIBNAME baselib '/homeloc/xtest1/staging/VA';
NOTE: Libref BASELIB was successfully assigned as follows:
Engine: V9
Physical Name: /homeloc/xtest1/staging/VA
27
28 data baselib.sample;
29 set LASRLIB.bird;
30 run;
NOTE: There were 157 observations read from the data set VAPUBLIC.BIRD.
NOTE: The data set BASELIB.SAMPLE has 157 observations and 31 variables.
NOTE: DATA statement used (Total process time):
real time 1.06 seconds
cpu time 0.07 seconds
. . .
. . .
Output 2. SAS Log from SAS Enterprise Guide
CONCLUSION
SAS Enterprise Guide is a very powerful and user friendly client tool for SAS. If SAS Visual Analytics
users are already familiar with SAS Enterprise Guide then user can use it with SAS visual Analytics as
well, which will make their life much easier. This paper explains few key tips for SAS user and
administrator both. Creation of ACT will help SAS administrator to manage their users easily and
efficiently.
10
ACKNOWLEDGEMENT
Authors would like to give special thanks Lisa Mendez and Lizette Alonzo, SCSUG 2016 Educational
Forum Co-Chair, for accepting our abstracts, paper and for organizing a great conference.
REFERENCE
https://en.wikipedia.org/wiki/SAS_(software)
Prasoon Sangwan, Tanuj Gupta, Piyush Singh, “Key Requirements for SAS® Grid Users” Proceedings
SAS Global Forum 2016, Las Vegas, NV, USA.
http://support.sas.com/resources/papers/proceedings16/7140-2016.pdf
Prasoon Sangwan, Piyush Singh, Shiv Govind, “Integrating SAS® and the R Language with Microsoft
SharePoint” Proceedings SAS Global Forum 2015, Dallas, TX, USA.
https://support.sas.com/resources/papers/proceedings15/2500-2015.pdf
Piyush Singh, Gerhardt M Pohl, “Enhancing SAS® Piping Through Dynamic Port Allocation” Proceedings
of SAS Global Forum 2014, Washington, DC, USA.
http://support.sas.com/resources/papers/proceedings14/1826-2014.pdf
CONTACT INFORMATION
Your comments and questions are valued and encouraged. Contact the author at:
Piyush Singh Prasoon Sangwan
[email protected] [email protected]
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of
SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Other brand and product
names are trademarks of their respective companies.
11