Kenny_I
Kenny_I

Reputation: 2503

Possible add 3 outcome of If Condition in Azure Data Factory?

I have If condition with one expression. Activity seems to support only True and False.

I would like to have 3 different outcome. Possible values are "A", "B" or "C"

It is possible with any tool or should I have If condition inside if condition?

Upvotes: 0

Views: 1196

Answers (2)

All About BI
All About BI

Reputation: 533

You may try to use Switch Activity: It could work on different possible outcomes

Switch Activity

Sample:

I have a pipeline that assigns a value to a variable based on parameter passed during runtime

Pipeline

the expression in my set variable activity is:

@string(mul(int(pipeline().parameters.flagvalue),10))

I am multiplying the parameter value by 10 and assigning to a vaiable called outflag.

Then in the switch activity i am checking the value of outflag as below

Switch Expression

In each switch case, you can have as many activities as you want.

Upvotes: 2

Nandan
Nandan

Reputation: 4925

You cannot have IF activity within another IF activity directly. One way is create a pipeline with 1 if activity call it in another pipeline within IF activity via execute pipeline activity. Or You can use Switch activity for multiple scenarios.

Upvotes: 0

Related Questions