BookmarkSubscribeRSS Feed
mvanmun
Calcite | Level 5

Hi there,

 

Since I'm a newbie not sure if I selected the right location, but let's give it a try.

I am desperately looking for some help regarding the use of conditions in a DIS job.

The DIS job is simple:   source table --> extract --> table loader --> target table

 

What I would like to achieve is to run the job only when the source table has record (hence record count > 0).

Else stop the process.

 

What steps to take?

Where do I put the start and end condition in the control flow?

 

Thanks for your help!

1 REPLY 1
LinusH
Tourmaline | Level 20

If the source have no records, I can't really see the benefit of aborting the job prematurely since the following steps shouldn't require any resource with no observations.

Nevertheless, I don't think that there's an out of the box functionality. One of many ways to handle would be to either write user written code to analyse the source table, or insert code to the post process of the extract transformation to check the result set (remember to create table - not view). Check the result and and issue the appropriate abort/abend/endsas statement.

 

There is a Condition Start/End transformations, but I think they are a bit over the top to use here, I think they make sense if wish to avoid part of the job, not if you wish to terminate immediately.

Data never sleeps

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
  • 1 reply
  • 1016 views
  • 0 likes
  • 2 in conversation