<?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 Re: Get data from REST API source with iterated nested API calls (with Data Pipelines) in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3380328#M533</link>
    <description>&lt;P&gt;Thanks a lot for the detailed explanation,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="603034" data-lia-user-login="Nero" class="lia-mention lia-mention-user"&gt;Nero&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;As for Lookup activity - what if I have more than 5000 rows?&lt;/P&gt;</description>
    <pubDate>Tue, 15 Aug 2023 08:44:49 GMT</pubDate>
    <dc:creator>iBusinessBI</dc:creator>
    <dc:date>2023-08-15T08:44:49Z</dc:date>
    <item>
      <title>Get data from REST API source with iterated nested API calls (with Data Pipelines)</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3346671#M434</link>
      <description>&lt;P&gt;I have a working Dataflow that does the following:&lt;/P&gt;&lt;P&gt;1. Pulls a Customers list from an API call (&lt;SPAN&gt;&lt;A href="https://api.somecrm.com/v1/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://api.somecrm.com/v1/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;customers&lt;/SPAN&gt;).&lt;BR /&gt;2. For EACH Customer it calls another API to get his/hers purchase history&amp;nbsp;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;A href="https://api.somecrm.com/v1/purchasehist/%7Bcustomerid" target="_blank" rel="noopener nofollow noreferrer"&gt;https://api.somecrm.com/v1/purchasehist/{customerid&lt;/A&gt;&lt;SPAN&gt;})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. I have 3 other nested queries, but I'll skip them for simplicity.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to build the same solution in the new&amp;nbsp;&lt;STRONG&gt;Pipelines&lt;/STRONG&gt;&amp;nbsp;in the Fabric. Two reasons for this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Although the Dataflows works fine, it sometimes gets: "429&amp;nbsp;Too Many Requests error", so I feel that Pipelines will give me more control, such as "Wait" step.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. I would like to save some outputs as JSON files in a Lakehouse, not just tables.&lt;BR /&gt;I am new to this environment so I'd like to learn how can I implement this scenario.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've seen several documentations and videos, but I am looking for the this specific scenario - several API calls with an iteration...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to build but got stuck in the ForEach activity with a syntax - how do I tell it how to get a specific customerID...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 13:53:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3346671#M434</guid>
      <dc:creator>iBusinessBI</dc:creator>
      <dc:date>2023-07-24T13:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from REST API source with iterated nested API calls (with Data Pipelines)</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3348021#M440</link>
      <description>&lt;P&gt;1. Web activity, ouputs array&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For each activity, use @activity('webactivity').output.value to iterate array&lt;/P&gt;&lt;P&gt;3. Copy activity inside For Each activity, use @item() to access each element. You can refer to&amp;nbsp;&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/74444899/how-to-store-web-activity-result-in-a-variable" target="_blank"&gt;azure - how to store web activity result in a variable? - Stack Overflow&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 06:31:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3348021#M440</guid>
      <dc:creator>GraceGu</dc:creator>
      <dc:date>2023-07-25T06:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from REST API source with iterated nested API calls (with Data Pipelines)</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3380305#M532</link>
      <description>&lt;P&gt;This method has extra steps for saving JSON files along the way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pipeline 1 : (get list of customerids, store in JSON file, create a Lakehouse Table)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy Data Activity (REST, HTTP should work too) Source=customers API endpoint, Destination=LH Customers.json file&lt;/LI&gt;&lt;LI&gt;Dataflow Activity - get data: source=Lakehouse Customers.json file [generated by step 1], data destination= Lakehouse Table: somecrm_customers (Replace)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Pipeline 2: ( loop through customer_ids in LH Table somecrm_customers [generated by Pipeline 1], store a JSON file for each customer)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Lookup Activity (Source=Lakehouse Table somecrm_customers ) - Note there is a 5,000 row limit on the lookup Activity&lt;/LI&gt;&lt;LI&gt;For Each Activity - iterate through each customerid output from the lookup&lt;img /&gt;&lt;P&gt;&lt;SPAN&gt;2.1 [Inside For Each Activity] Copy Data Activity (REST) source=purchasehist API endpoint (insert customerid as variable), Destination= PurchaseHist&amp;lt;customerid&amp;gt;.json files&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you don’t want to use dataflows at all, you can replace dataflow in Pipeline 1 with a Notebook Activity instead (Use pyspark to Read json file and save as Lakehouse table)&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 08:27:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3380305#M532</guid>
      <dc:creator>Nero</dc:creator>
      <dc:date>2023-08-15T08:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from REST API source with iterated nested API calls (with Data Pipelines)</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3380328#M533</link>
      <description>&lt;P&gt;Thanks a lot for the detailed explanation,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="603034" data-lia-user-login="Nero" class="lia-mention lia-mention-user"&gt;Nero&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;As for Lookup activity - what if I have more than 5000 rows?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 08:44:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3380328#M533</guid>
      <dc:creator>iBusinessBI</dc:creator>
      <dc:date>2023-08-15T08:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from REST API source with iterated nested API calls (with Data Pipelines)</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3380431#M535</link>
      <description>&lt;P&gt;hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="366865" data-lia-user-login="iBusinessBI" class="lia-mention lia-mention-user"&gt;iBusinessBI&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get past the 5,000 limit we added an outer loop "pipeline" that iterated over the customerids in batches of 5,000 as suggested &lt;A href="https://learn.microsoft.com/en-us/azure/data-factory/control-flow-lookup-activity#limitations-and-workarounds" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We actually used a Dataflow to copy all the customerids from the Lakehouse table into a Fabric Datawarehouse table (the datawarehouse table let us do TSQL functionality like ROW_NUMBER() which helped to separate the customerids into batches of 5,000, we also used that same warehouse table as the source for the lookup activity).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can write up more detailed instructions if that helps? (but will take me a while!). I am hopeful that there will be new Fabric functionality soon that would negate the need to use the Warehouse to solve this problem. Or maybe someone else knows a Notebook solution.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 10:17:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Get-data-from-REST-API-source-with-iterated-nested-API-calls/m-p/3380431#M535</guid>
      <dc:creator>Nero</dc:creator>
      <dc:date>2023-08-15T10:17:46Z</dc:date>
    </item>
  </channel>
</rss>

