I’m just starting to use the advanced options in the expression editor of Data Integration Studio.
Is there a way to do an if else statement in Data Integration Studio Expression editor? Do I have to use a case statement, if so where is the case statement function on the interface?
Most transformations which allow you to enter columns level expressions is using SQL (verify by viewing the code generated).
Hence, if-then-else is not supported.
My own experience implementing ETL is that case expressions works as good as if-then-else. More complicated patterns requiring if-then-else is rare, and when occurs is either a signal of a faulty target model, or can be implemented by User Written code node.
There is a case button in the expression selection drop down although using it is inefficient. I found how to manually write case syntax in the advanced expression screen. You just type in it in like.
case
when W77MQJBD.AWARD_CATEGORY='24'
end
If this could be done using if else in the expression editor it would save me a lot of time because my SAS code uses if else instead of case.
Most transformations which allow you to enter columns level expressions is using SQL (verify by viewing the code generated).
Hence, if-then-else is not supported.
My own experience implementing ETL is that case expressions works as good as if-then-else. More complicated patterns requiring if-then-else is rare, and when occurs is either a signal of a faulty target model, or can be implemented by User Written code node.
The reply I got from SAS technical support is that If / Else is not integrated into Data Integration Studio. Unless you want to use a coded datastep.
Without the ability to use basic SAS code in the graphical areas the tool doesn't have much of a SAS feel to it.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.