<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Filter not working properly in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-not-working-properly/m-p/4674894#M7678</link>
    <description>&lt;P&gt;I am very new to Azure Data Factory, and to be honest I have no clue what I am doing.&lt;BR /&gt;&lt;BR /&gt;Owh well here we go, I got a pipeline with extracting a XML to my database and it works fine.&lt;BR /&gt;But the thing is I need to filter on multiple CustomerID (Sap_ID). These customers don't use our apps so it has no use for us to use the pipeline. What I am working with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a pipeline variable with:&amp;nbsp;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;SPAN&gt;split(pipeline().&lt;/SPAN&gt;&lt;SPAN&gt;parameters&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Folderpath&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'/'&lt;/SPAN&gt;&lt;SPAN&gt;)[&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;this works fine but when I want to use it for the filter is gives so errors.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I use the pipeline variable of the CustomerID and use&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1202716" data-lia-user-login="not" class="lia-mention lia-mention-user"&gt;not&lt;/a&gt;(equals(item().Customer_SapID, 123456)) to filter it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it returns an error saying it expects an array. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I solve this? And how can I use multiple Customer_SapID in my filter?&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2025 14:17:07 GMT</pubDate>
    <dc:creator>AlexTheGreat</dc:creator>
    <dc:date>2025-04-30T14:17:07Z</dc:date>
    <item>
      <title>Filter not working properly</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-not-working-properly/m-p/4674894#M7678</link>
      <description>&lt;P&gt;I am very new to Azure Data Factory, and to be honest I have no clue what I am doing.&lt;BR /&gt;&lt;BR /&gt;Owh well here we go, I got a pipeline with extracting a XML to my database and it works fine.&lt;BR /&gt;But the thing is I need to filter on multiple CustomerID (Sap_ID). These customers don't use our apps so it has no use for us to use the pipeline. What I am working with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a pipeline variable with:&amp;nbsp;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;SPAN&gt;split(pipeline().&lt;/SPAN&gt;&lt;SPAN&gt;parameters&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Folderpath&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'/'&lt;/SPAN&gt;&lt;SPAN&gt;)[&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;this works fine but when I want to use it for the filter is gives so errors.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I use the pipeline variable of the CustomerID and use&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1202716" data-lia-user-login="not" class="lia-mention lia-mention-user"&gt;not&lt;/a&gt;(equals(item().Customer_SapID, 123456)) to filter it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it returns an error saying it expects an array. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I solve this? And how can I use multiple Customer_SapID in my filter?&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 14:17:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Filter-not-working-properly/m-p/4674894#M7678</guid>
      <dc:creator>AlexTheGreat</dc:creator>
      <dc:date>2025-04-30T14:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Filter not working properly</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-not-working-properly/m-p/4675415#M7681</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="819416" data-lia-user-login="AlexTheGreat" class="lia-mention lia-mention-user"&gt;AlexTheGreat&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to Microsoft Fabric Community Forum.&lt;/P&gt;
&lt;P&gt;You're using &lt;SPAN&gt;Azure Data Factory (ADF)&lt;/SPAN&gt; to pull XML data into your database. The problem is: you want to &lt;SPAN&gt;exclude certain customers based on their CustomerID (Sap_ID)&lt;/SPAN&gt; — because they don’t use your apps, so they aren’t needed in the report.&lt;/P&gt;
&lt;P&gt;You tried filtering one CustomerID using:&lt;/P&gt;
&lt;P&gt;@not(equals(item().Customer_SapID, 123456))&lt;/P&gt;
&lt;P&gt;This works for just &lt;SPAN&gt;one ID&lt;/SPAN&gt;, but you need to &lt;SPAN&gt;filter multiple IDs&lt;/SPAN&gt;, like excluding 123456, 789012, and 345678. Also, ADF gave you an error saying &lt;SPAN&gt;“expects an array”&lt;/SPAN&gt; because the filtering logic wasn’t using a proper list.&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 13.0pt;"&gt;&lt;SPAN&gt;You can do a few workarounds:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL style="direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Arial; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="1"&gt;
&lt;LI style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="1"&gt;&lt;SPAN&gt;Create a list of IDs you want to filter&lt;BR /&gt;For example:&lt;BR /&gt;&lt;STRONG&gt;["123456", "789012", "345678"]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"&gt;&lt;SPAN&gt;Pass it as a parameter or set it in a variable&lt;BR /&gt;This is your exclusion list.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"&gt;&lt;SPAN&gt;In your Filter activity, use this logic:&lt;BR /&gt;&lt;STRONG&gt;@not(contains(variables('BlockedCustomers'), item().Customer_SapID))&lt;/STRONG&gt;&lt;BR /&gt;If you're using a pipeline parameter instead of a variable, just change it to:&lt;BR /&gt;&lt;STRONG&gt;@not(contains(pipeline().parameters.BlockedCustomers, item().Customer_SapID))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P style="margin: 0in; margin-left: .75in; font-family: 'Segoe UI Emoji'; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;This will filter out all items in your data that match the CustomerIDs in the list.&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;If you want to &lt;SPAN&gt;keep only certain customers&lt;/SPAN&gt;, use:&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;&lt;STRONG&gt;@contains(pipeline().parameters.AllowedCustomers, item().Customer_SapID)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;If you're passing your list as a text string like "123456,789012", just convert it to a list using:&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;&lt;STRONG&gt;@split(pipeline().parameters.CustomerIDs, ',')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="direction: ltr;"&gt;
&lt;TABLE style="direction: ltr; border-collapse: collapse; border: 1pt solid #A3A3A3;" title="" border="1" summary="" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="background-color: #c5e0b3; vertical-align: top; width: 7.5284in; padding: 4pt 4pt 4pt 4pt; border: 1pt solid #A3A3A3;"&gt;
&lt;H4 style="margin: 0in; font-family: Calibri; font-size: 12.0pt;"&gt;&lt;SPAN&gt;If this post helps, then please consider &lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accepting as solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt; to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!&lt;/SPAN&gt;&lt;/H4&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;B Manikanteswara Reddy&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; margin-left: .375in; font-family: Arial; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2025 05:37:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Filter-not-working-properly/m-p/4675415#M7681</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-01T05:37:37Z</dc:date>
    </item>
  </channel>
</rss>

