0

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()))
user2841795
  • 375
  • 3
  • 10
  • 25

2 Answers2

0

These are effectively the same ... does it help?

iifNull(column1,'Unknown',column1)

iif(isNull(),'Unknown',column1)

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

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

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

Mark Kromer MSFT
  • 3,578
  • 1
  • 10
  • 11
0

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

Steve Johnson
  • 8,057
  • 1
  • 6
  • 17