jeudi 2 septembre 2021

How to write an IF..ELSE IF or CASE statement in Azure Data Factaroy

This is my doubt. In my Pipeline I've got a parameter provided by the final user. I need to check it to return the right value. So far, I have only seen this structure IF(condition, true, false). But in my scenario this could be complicated to understand/maintain because I would get multiple nested conditions IF(condition, true, IF(Condition, true, ...))

So, I'm wondering if it is possible to get an easier way to write this, something similar to and if-else or case statement. Something like this:

CASE @parameter 
    WHEN 'A' THEN 1
    WHEN 'B' THEN 2
    WHEN 'C' THEN 3
    ELSE '4'
END

Aucun commentaire:

Enregistrer un commentaire