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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1006 views
  • 0 likes
  • 2 in conversation