BookmarkSubscribeRSS Feed

SAS Viya: SAS Studio Flow Execute Decisions Step

Started ‎06-13-2022 by
Modified ‎06-13-2022 by
Views 1,996

The Execute Decisions step enables you to use the logic of your SAS Intelligent Decisioning Decisions within a SAS Studio Flow. The use of the Execute Decisions step requires SAStudio Engineer license  and SAS Intelligent Decisioning.  It also requires the following:

 

  • The SAS Intelligent Decisioning Decision must be published to CAS
  • The input to the Execute Decisions step must be a CAS table.

 

CAS Publication Destination

 

The SAS Intelligent Decisioning Decision must be published to CAS.  If a CAS Publishing Destination doesn't exist, then a SAS Administrator needs to create one in SAS Environment Manager.

 

mk1_ManageDecisions.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.

 

For more information on creating Publishing Destinations, refer to its documentation.    

 

CAS Table Input

 

The input to the Execute Decisions step must be a CAS table, so ensure the table you want to use as the input to the decision is loaded to memory in CAS.

 

mk2_ManageDecisions.png

 

Decision Published to CAS

 

Build the decision you want to use in your SAS Studio Flow in SAS Intelligent Decisioning.

 

mk3_ManageDecisions.png

 

Test the decision in SAS Intelligent Decisioning with your CAS input table.

 

mk4_ManageDecisions.png

 

Publish the decision to a CAS publishing destination.

 

mk5_ManageDecisions.png

 

Test the published decision in Publishing Validation with your CAS input table.

 

mk6_ManageDecisions.png

 

For more information on creating, testing, and publishing decisions, refer to the SAS Intelligent Decisioning documentation.  

   

Create SAS Studio Flow using Execute Decisions Step

 

In SAS Studio, create a new Flow and on the Snippets pane, right-click the snippet Generate SAS librefs for caslibs and select Add to flow.

 

mk7_ManageDecisions.png

 

This code creates a CAS session and creates SAS librefs for existing caslibs, so they are visible in the Libraries pane.  You need to run this step to select the CAS table you are using as input for your Execute Decisions step.

 

mk8_ManageDecisions.png

 

Next in the Libraries pane, right-click the CAS input table and select Add to flow to add it to the flow.

 

mk9_ManageDecisions.png

 

On the Steps pane, double-click the Execute Decisions step located in the Integrate section to add it to the flow.  Connect it to the CAS input table node.

 

mk10_ManageDecisions.png

 

Select the published decision.  Note:  Only decisions published to a CAS destination are available for selection.

 

mk11_ManageDecisions.png

 

mk12_ManageDecisions.png

 

Next on the Input variables tab, map the fields from the source table to the input variables of the selected decision.  Fields with the same name and type are auto-mapped for you.  Note: All columns must be successfully mapped for the Execute Decisions step to run.

 

mk13_ManageDecisions.png

 

The Output variables are the output variables from the selected decision.

 

mk14_ManageDecisions.png

 

Save and run the flow to test it.  Preview the output of the Execute Decisions step.

 

mk15_ManageDecisions.png

 

If I close the saved flow, I can re-open and run it again. I can also add any step(s) to the flow as desired to work with the output of the selected decision.  For example, in my case I could branch the flow based on whether or not the car should be considered for purchase.

 

mk16_ManageDecisions.png

 

For more information on working with SAS Studio Flows, refer to its documentation

 

Summary

 

The Execute Decisions step is used to run a SAS Intelligent Decisioning decision that is published to CAS in SAS Studio Flow.  For more information on this step, please refer to its documentation.      

 

 

Find more articles from SAS Global Enablement and Learning here.

Comments

MK, great example! Easy to follow and replicate.

Version history
Last update:
‎06-13-2022 04:30 PM
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