BookmarkSubscribeRSS Feed

Data Entry in SAS Visual Analytics 8.3: Part 1, The basics

Started ‎08-05-2019 by
Modified ‎08-20-2019 by
Views 6,354

One of the most popular questions we hear is, is it possible to achieve data entry using SAS Visual Analytics 8.3. In the SAS 9 world, there was a simple answer: include a stored process in your report.

 

Do you think the answer will be the same in the SAS Viya world?

 

Using SAS Visual Analytics 8.3, the answer is a bit different. You can still use stored processes but they are executed in SAS 9 environment. This means that customers having only SAS Viya can't use that solution. In addition, stored processes with prompts are not 100% supported as the prompt value can't be updated and the default values are used.

 

SAS Viya 3.4 offers SAS Viya Jobs. Those jobs are pretty similar to stored processes and can be considered in many ways as their successor. The Viya Jobs will execute SAS code on the SAS Compute Server as depicted in the picture below:

 

xab_DataEntry1_diagram.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

The jobs can be executed from the SAS Job Execution Web Application:

 

xab_DataEntry1_jobExecution.png

 

or using URL similar to:

 

http://host:port/SASJobExecution/?_program=/SomeFolder/Hello World

 

While developing your code, you can use macro variables, access files, load table into CAS, execute CAS actions, essentially any code that can be executed in a SAS session can be transformed and executed in Viya jobs.

 

Macro variables are really useful when it comes to pass parameters to the job. Calling the following url will execute the "myJob" program located in "Folder1" with a parameter "p" having a value of "123". The "p" parameter can then be retrieved using macro variable "p".

 

http://host:port/SASJobExecution/form/?_program=/Folder1/myJob&p=123

 

This is an easy way to call the jobs with parameters but there is more available. You can create your own form to define the parameters. There is no prompting framework like the one available in SAS 9 but you can write a form using html code. The form will then pass those parameters to the job which will execute and return the html to be displayed in the browser. If you wish, you can create other output types like a csv or pdf files.

 

Once a Viya job is defined, it can then be integrated in the Visual Analytics report in the Viya environment using either the web content object or data-driven content object.

 

The objective of this series of articles is to walk you through the steps to add data entry functionality to a Visual Analytics report.

 

Here is a summary of the series:

  1. The basics
  2. Write a Viya Job with a form
  3. Integrate Viya Jobs in SAS Visual Analytics

While reading those entries, you will get information about:

  • Viya Jobs
  • Data loading techniques and concurrency
  • Web content and Data-Driven content objects

Do you need to know something before starting? There is no prerequisite. It will nevertheless be easier as a reader if you know a bit of html, CAS and SAS programming.

 

If you want to get more information before my next post, here is a good start:

Version history
Last update:
‎08-20-2019 07:53 AM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags