Home > Software design >  How do you filter for a string (not) containing a substring in an Azure Data Factory data flow expre
How do you filter for a string (not) containing a substring in an Azure Data Factory data flow expre

Time:07-28

As someone with a background in Alteryx, it has been a slow process to get up to speed with the expressions and syntax within Azure Data Factory data flows. I am trying to filter out rows containing the following string in a similar manner to this Alteryx filter code below:

!Contains([Subtype], "News")

After scrolling through all the string expressions in Azure Data Factory, I am struggling to find anything similar to the logic above. Thanks in advance for any help you can provide me on this front!

CodePudding user response:

You can use Filter transformation in ADF Data flow and give the condition for any column like below:

My Sample Data:
enter image description here

Here I am filtering out the rows the which contains a string of "Rakesh" in the Name column with the Data flow expression instr(Name,"Rakesh")==0. instr() returns number of common letters. Our condition satisfies if its result is 0.

Filter Transformation: .
enter image description here
Output in Data preview of filter:

You can see the remaining rows only in the result.
enter image description here

  • Related