BookmarkSubscribeRSS Feed
ASASProgrammer
Calcite | Level 5


For example, if the SAS data set is empty, then it skips the fast load to Teradata table.

Thanks in advance!

1 REPLY 1
Patrick
Opal | Level 21

Conditional execution of jobs is normally done via scheduler. LSF for example allows for such conditional job execution.

You have always the option to wrap a job into a macro using job pre- and post-code.

In the pre-code section you have then something like "%macro MyMacro; %if <expression> %then %do;", and in the post-code you have something like "%end; %mend; %MyMacro;"

You can do the same in the pre- and post-code of any node as well. If you want several nodes wrapped into such a macro then I probably would use separate user written code nodes to define the macro for clarity. But you could also just use the pre-code of the first node and the post-code of the last node to set this up.

Not sure what happens if you feed an empty table to the teradata table loader. I would assume if the table is empty then no loading happens so may be you even don't have to care about conditional processing (but of course if it's a replace load then the target table would still get truncated).

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 643 views
  • 0 likes
  • 2 in conversation