two expressions in one expression builder in ADF

5k Views Asked by At

Can we use two expressions in expression builder in data factory?

For example:

If I have a string column and I would like to to have two expression in expression builder. the two conditions are: if a value is empty then return space '' or if a value is not integer then return the column name.

iifNull(column1,'Unknown') OR iif(!isInteger(column1),'column1',toString(null()))
2

There are 2 best solutions below

2
On

or( : boolean, : boolean) => boolean

Logical OR operator. Same as ||.

or(true, false) -> true

true || false -> true

No. If you want to use or() function in expression builder, the parameter must be boolean value. Your expression returns string value, so it can't work. You need to do this in two expression builder.

Reference: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-expression-functions#or

1
On