BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kevind21
Calcite | Level 5

I'm trying to make use of the setoutputslot functionality in Dataflux Studio, and I'm not sure I understand how to implement it. In the job that I'm working on there are 2 different types of files that I need to process. As the two different files are related to the same project and potentially we will receive the files at the same time, I'm trying to use two different data jobs within the same process job to process them. I'm using a process table reader to loop through the different filenames, and based on the filename have an expression node redirect the flow to the appropriate data job. Once its looped through both filenames in the process reader, and the process reader has an EOF status the job should end. Therefore, I assume that I need 3 output slots: one for filename #1, one for filename #2, and one for the exit. What I initially thought was that the expression node would support multiple output slots, and that the setoutputslot would be somewhat similar to a branch, where the flow was just redirected. I've tried to created create multiple output slots on the expression node but it only allows me one slot. How can I direct the flow if only 1 output slot is available? An example job using the setoutputslot functionality would be extremely appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
andrew_s
SAS Employee

You are on the right track with the expression node. Here is an example of how you'd create three output slots on your expression with 3 different labels and set one of them as the output slot. Note the comment at the top of the expression which is used by the UI to determine how many output slots the expression has

 

//! slot 0 Description for Path A
//! slot 1 Description for Path B
//! slot 2 Description for Path C

 

...your logic here...:

if some condition
setoutputslot(1)

else

setoutputslot(2)

View solution in original post

2 REPLIES 2
andrew_s
SAS Employee

You are on the right track with the expression node. Here is an example of how you'd create three output slots on your expression with 3 different labels and set one of them as the output slot. Note the comment at the top of the expression which is used by the UI to determine how many output slots the expression has

 

//! slot 0 Description for Path A
//! slot 1 Description for Path B
//! slot 2 Description for Path C

 

...your logic here...:

if some condition
setoutputslot(1)

else

setoutputslot(2)

kevind21
Calcite | Level 5

Excellent! That's exactly what I was looking for. Thank you Andrew.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 983 views
  • 1 like
  • 2 in conversation