Loading a SAS dataset to the LASR Analytic Server for access via Visual Analytics can be easily completed in the Visual Analytics point-and-click interface. But you can also load a dataset using base SAS code. There is a simple flow seen below to use code:
Note that the order of the steps are important, for instance, SAS will produce an error if you attempt to load a dataset to LASR that already exists on LASR. For the example below we assume variable assignments for a typical SAS installation, inserting your own web server URL. Things like port numbers and metadata library information may need to be changed. This example will load the CLASS dataset from the SASHELP library.
/* Connect to LASR */ libname lasrtemp tag=vapublic port=10031 host="url.com" signer=http://url.com:7980/SASLASRAuthorization; /* Drop table that will be created */ proc sql noprint; drop table lasrtemp.class; quit; /* Remove any underlying table Metadata - not necessary, but a good practice */ proc metalib; omr (library = "/Shared Data/SAS Visual Analytics/Public/Visual Analytics Public LASR" repname = "Foundation" ); select = ("class"); update_rule = (delete); run; /* Create table in LASR */ data lasrtemp.class; set sashelp.class; run; /* Create table Metadata */ proc metalib; omr (library = "/Shared Data/SAS Visual Analytics/Public/Visual Analytics Public LASR" repname = "Foundation" ); select = ("class"); run;
Once you have loaded your data using the above code, it will be available for use in SAS Visual Analytics. In SAS Visual Analytics, Navigate to the Report Designer Page. Now select the Data tab and then click Add Data Source. Your newly loaded data should be available in the pop-up.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.