In a past life I worked at a company who had an excellent general manager, she was professional, intelligent, and a role model. It was a small company competing with giants and kicking their butt successfully. She set a new mission for the organization – we needed to not only meet a customer’s product needs but also delight them in the process. Its hard to be delightful. It’s why I like to buy products from companies who meet my needs and delight me. In fact, her mission statement was the first thing that came to my mind when I saw this little gem in SAS Enterprise Guide.
Let SAS Enterprise Guide Delight You
If you have created data and you want to upload it to the LASR server for analysis, just click a task. That’s right – just right-click the data set name and select Load to LASR from the menu. In a few moments – your data will be waiting for you in SAS Visual Analytics.Of course – this assumes you have permission to load and can access the LASR server. [Your system administrator can assist with those steps.]
Here’s the specific steps:
- Right-click the data in the Project Tree then select Upload to LASR from the pop-up menu. An Upload to LASR window appears.
- Select the LASR library and change the metadata location if needed.
- Click Run. Viola.
If your data load was successful – you’ll get a message similar to the following showing where the data was loaded. If the load failed – you will also be informed. [Need to understand the difference in SAS Enterprise Guide and SAS Visual Analytics?]
Let’s Look Under the Covers
As with any SAS Enterprise Guide task you can open it to see the code. It’s a series of 3 macros. Here’s a flow chart showing what the program does. [Tips for flow charting your SAS code]
Notice the first thing the code does is check to see if the data already exists in the LASR Server and then deletes it if it does. Unlike a database, you cannot just overwrite data – it must be replaced. This task deletes the data set with the same name. A few things to consider:
- If there is already a data set in the LASR with the same name and does not belong to you – it will be removed
- If you have changed the data set name – maybe you added today’s date or a “_v2” this will be considered a new data set. So don’t forget to change an existing report data source!
Make the Upload to LASR Server Code Yours
With a few simple changes – you can make this code yours. [Here’s the code as presented from SAS EG.] You may want to add it to a batch process or even a SAS stored process. In the above example, the code was loaded to the Public LASR Server. There are three areas of the code where the data set is called by name – you can make those areas into a macro or manually change the name.
The first time it calls the data set is when the code checks to see if the data set already exists. Then when it loads the code to the LASR server – it provides the name. Distributed VA uses the LASR procedure while the non-distributed version just uses a simple data step. The LASR procedure makes quick work of loading large tables!
The third area is when the task registers the data in metadata. It has to have this step or you won’t be able to see it in the import list. Remember if you are creating macro variables to use double quotes.
Notes: I’m using SAS Enterprise Guide 7.1.1 for this demo.
Never miss a BI Notes post!
Click here for free subscription. Once you subscribe you'll be asked to confirm your subscription through your email account. You email address is kept private and you can unsubscribe anytime.