Column to check if it has integer value or not using ADF Expression Builder

1.8k Views Asked by At

I have a string column called (Code) which will always have an integer value. I want to check if a Code column got Integer data put the source value, but if Code got string value in it then put 'Invalid' in Code column. Checker column will provide which row is invalid. e.g. If Code column got String value then put the column name otherwise leave it empty.

Code    CodeNewColumn    Checker
7875    7875    
9856    9856    
6545    6545    
565L    Invalid          Code
G787    Invalid          Code

I am using Derived column in Dataflow, can anyone please help me.

1

There are 1 best solutions below

0
On

Create a Derived Column with 2 columns: CodeNewColumn, Checker.

Use these expressions:

CodeNewColumn = iif(isInteger(Code),Code,'Invalid') Checker = iif(!isInteger(Code),'Code',toString(null()))