<?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 in $project cursor in copy activity using Atlas MongoDB connector doesn't work in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4081462#M4880</link>
    <description>&lt;P&gt;I have MongoDB Atlas as a source and then upload this data into Fabric DWH with some mappings&lt;BR /&gt;I've set up a $project cursor method in the "Source" tab of the Data Pipeline Copy Activity&lt;/P&gt;&lt;P&gt;It works fine when I write it like this:&amp;nbsp;&amp;nbsp;{field1: 1,&amp;nbsp;field2: 1, field3: 1}&lt;/P&gt;&lt;P&gt;But in my case, I need to add more complex logic with filtering for a particular field, like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;field1: &lt;SPAN&gt;1&lt;/SPAN&gt;, &lt;BR /&gt;field2: &lt;SPAN&gt;1&lt;/SPAN&gt;, &lt;BR /&gt;&lt;SPAN&gt;results&lt;/SPAN&gt;: {&lt;BR /&gt;    &lt;SPAN&gt;$filter&lt;/SPAN&gt;: {&lt;BR /&gt;      &lt;SPAN&gt;input&lt;/SPAN&gt;: &lt;SPAN&gt;'$results'&lt;/SPAN&gt;,&lt;BR /&gt;      &lt;SPAN&gt;as&lt;/SPAN&gt;: &lt;SPAN&gt;'result'&lt;/SPAN&gt;,&lt;BR /&gt;      &lt;SPAN&gt;cond&lt;/SPAN&gt;: {&lt;BR /&gt;        &lt;SPAN&gt;$in&lt;/SPAN&gt;: [&lt;BR /&gt;          &lt;SPAN&gt;'$$result.step'&lt;/SPAN&gt;,&lt;BR /&gt;          [&lt;BR /&gt;            &lt;SPAN&gt;'Value1'&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;'Value2'&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;'Value3'&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;'Value4'&lt;BR /&gt;&lt;/SPAN&gt;          ]&lt;BR /&gt;        ]&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;But the fact that this query works with aggregate() function in MongoDB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can be the issue using this projection within copy activity?&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 13:47:19 GMT</pubDate>
    <dc:creator>pafnuty</dc:creator>
    <dc:date>2024-08-05T13:47:19Z</dc:date>
    <item>
      <title>Filter in $project cursor in copy activity using Atlas MongoDB connector doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4081462#M4880</link>
      <description>&lt;P&gt;I have MongoDB Atlas as a source and then upload this data into Fabric DWH with some mappings&lt;BR /&gt;I've set up a $project cursor method in the "Source" tab of the Data Pipeline Copy Activity&lt;/P&gt;&lt;P&gt;It works fine when I write it like this:&amp;nbsp;&amp;nbsp;{field1: 1,&amp;nbsp;field2: 1, field3: 1}&lt;/P&gt;&lt;P&gt;But in my case, I need to add more complex logic with filtering for a particular field, like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;field1: &lt;SPAN&gt;1&lt;/SPAN&gt;, &lt;BR /&gt;field2: &lt;SPAN&gt;1&lt;/SPAN&gt;, &lt;BR /&gt;&lt;SPAN&gt;results&lt;/SPAN&gt;: {&lt;BR /&gt;    &lt;SPAN&gt;$filter&lt;/SPAN&gt;: {&lt;BR /&gt;      &lt;SPAN&gt;input&lt;/SPAN&gt;: &lt;SPAN&gt;'$results'&lt;/SPAN&gt;,&lt;BR /&gt;      &lt;SPAN&gt;as&lt;/SPAN&gt;: &lt;SPAN&gt;'result'&lt;/SPAN&gt;,&lt;BR /&gt;      &lt;SPAN&gt;cond&lt;/SPAN&gt;: {&lt;BR /&gt;        &lt;SPAN&gt;$in&lt;/SPAN&gt;: [&lt;BR /&gt;          &lt;SPAN&gt;'$$result.step'&lt;/SPAN&gt;,&lt;BR /&gt;          [&lt;BR /&gt;            &lt;SPAN&gt;'Value1'&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;'Value2'&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;'Value3'&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;'Value4'&lt;BR /&gt;&lt;/SPAN&gt;          ]&lt;BR /&gt;        ]&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;But the fact that this query works with aggregate() function in MongoDB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can be the issue using this projection within copy activity?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 13:47:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4081462#M4880</guid>
      <dc:creator>pafnuty</dc:creator>
      <dc:date>2024-08-05T13:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Filter in $project cursor in copy activity using Atlas MongoDB connector doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4083520#M4893</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="786334" data-lia-user-login="pafnuty" class="lia-mention lia-mention-user"&gt;pafnuty&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ensure that the MongoDB Atlas connector configured in the replication activity supports the use of $filter in the $project phase.&lt;/P&gt;
&lt;P&gt;You can refer to the following official documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/data-factory/connector-mongodb-atlas?tabs=data-factory" target="_blank"&gt;Copy data from or to MongoDB Atlas - Azure Data Factory &amp;amp; Azure Synapse | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 07:56:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4083520#M4893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-06T07:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Filter in $project cursor in copy activity using Atlas MongoDB connector doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4086040#M4905</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Seems like this is not supported by Azure Data Factory&lt;/P&gt;&lt;P&gt;Do you think there is some other way of applying this filtering with the help of Fabric?&lt;BR /&gt;I have really a lot of data in case I'm not using filtering, which increase processing time in tens times&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 06:56:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4086040#M4905</guid>
      <dc:creator>pafnuty</dc:creator>
      <dc:date>2024-08-07T06:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Filter in $project cursor in copy activity using Atlas MongoDB connector doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4110790#M5061</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="786334" data-lia-user-login="pafnuty" class="lia-mention lia-mention-user"&gt;pafnuty&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a suggestion that you can create an Azure Function to handle complex filtering logic. This Azure Function is then called in the data factory to process the data and pass the results to the next copy activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 08:57:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Filter-in-project-cursor-in-copy-activity-using-Atlas-MongoDB/m-p/4110790#M5061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-21T08:57:14Z</dc:date>
    </item>
  </channel>
</rss>

