<?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 How to collect data from different sources dynamically using foreach loop activity in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4298519#M4635</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to collect data from different data sources and store data in dataset dynamically using Foreach activity.&lt;BR /&gt;Once I collect the data from different sources via Foreach activity, i would like to perform join or union based on client data and configurations(json).&lt;BR /&gt;&lt;BR /&gt;Is it possible to create datasets dynamically?&lt;/P&gt;</description>
    <pubDate>Sun, 24 Nov 2024 07:24:44 GMT</pubDate>
    <dc:creator>RajuArge</dc:creator>
    <dc:date>2024-11-24T07:24:44Z</dc:date>
    <item>
      <title>How to collect data from different sources dynamically using foreach loop activity</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4298519#M4635</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to collect data from different data sources and store data in dataset dynamically using Foreach activity.&lt;BR /&gt;Once I collect the data from different sources via Foreach activity, i would like to perform join or union based on client data and configurations(json).&lt;BR /&gt;&lt;BR /&gt;Is it possible to create datasets dynamically?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2024 07:24:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4298519#M4635</guid>
      <dc:creator>RajuArge</dc:creator>
      <dc:date>2024-11-24T07:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect data from different sources dynamically using foreach loop activity</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4298878#M4640</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/861930"&gt;@RajuArge&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can dynamically create datasets and perform join or merge operations using ForEach activities. The general steps are as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a ForEach activity that traverses an array containing information about the data sources.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inside the ForEach loop, you can use activities such as Copy Data to extract data from each source and store it in a temporary dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the end of the ForEach loop, use the Data Flow activity to join the two datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Store the joined dataset in the target location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-factory/foreach-activity" target="_blank"&gt;ForEach activity - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 01:36:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4298878#M4640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-25T01:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect data from different sources dynamically using foreach loop activity</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4299803#M4644</link>
      <description>&lt;P&gt;Hi Nono Chen,&lt;BR /&gt;&lt;BR /&gt;Thank you so much for quick reply. API is also one of my data source so , how we pull data from API efficiently iteratively. Can you please help me out with this?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 11:23:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4299803#M4644</guid>
      <dc:creator>RajuArge</dc:creator>
      <dc:date>2024-11-25T11:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect data from different sources dynamically using foreach loop activity</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4301369#M4659</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/861930"&gt;@RajuArge&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have multiple APIs to deal with, you may want to consider the following suggestions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a configuration file that stores all API information in a json file or other format. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "apis": [
    {
      "name": "API 1",
      "url": "https://api.example1.com/data",
      "method": "GET",
      "auth": "Bearer YOUR_API_KEY"
    },
    {
      "name": "API 2",
      "url": "https://api.example2.com/data",
      "method": "GET",
      "auth": "Bearer YOUR_API_KEY"
    }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a Foreach activity to iterate through the list of APIs. Transfer the list of APIs as a collection of inputs to the Foreach activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a Web activity inside Foreach to extract the URL of the current API with dynamic content, for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@{item().url}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select the request method, GET.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@{item().method}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Store the response data for each API into a temporary dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data from multiple APIs can be merged in subsequent steps using the Data Flow activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 06:20:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/How-to-collect-data-from-different-sources-dynamically-using/m-p/4301369#M4659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-26T06:20:53Z</dc:date>
    </item>
  </channel>
</rss>

