<?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: Fabric API Table load required parameters in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-API-Table-load-required-parameters/m-p/4053106#M3184</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, note that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the Fabric REST API, you first need to get a Microsoft Entra token for the Fabric service. Then use the token in the authorization header of the API call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can click on the official document below to learn:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/articles/get-started/fabric-api-quickstart" target="_blank"&gt;Fabric API quickstart - Microsoft Fabric REST APIs | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, this API is asynchronous, so it requires three steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use the OneLake API to upload files and folders to the "Files" section of your lakehouse.&lt;/LI&gt;
&lt;LI&gt;Submit the payload to the Table API request.&lt;/LI&gt;
&lt;LI&gt;Track the status of the operation until it completes.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, run the following command in the notebook corresponding to your lakehouse, replacing &lt;STRONG&gt;"YOUR_ACCESS_TOKEN", {workspaceId}, {lakehouseId}&lt;/STRONG&gt;, and the &lt;STRONG&gt;products&lt;/STRONG&gt; table name with the appropriate values.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import requests

url = https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId} /tables/products/load
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
data = {
   
       "relativePath": "Files/products.csv",
       "pathType": "File",
       "mode": "overwrite",
       "formatOptions": {
           "header": True,
           "delimiter": ",",
           "format": "CSV"
       }
   
}

response = requests.post(url, headers=headers, json=data)

print(response.status_code)
print(response.json())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran it successfully.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vhuijieymsft_0-1721627462367.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1136126i74E9726554835087/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vhuijieymsft_0-1721627462367.png" alt="vhuijieymsft_0-1721627462367.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2024 05:52:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-22T05:52:03Z</dc:date>
    <item>
      <title>Fabric API Table load required parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-API-Table-load-required-parameters/m-p/4050886#M3154</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to load a table in Fabric following this documentation:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-api" target="_blank" rel="noopener"&gt;Lakehouse management API - Microsoft Fabric | Microsoft Learn .&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It uses the following API call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId}/tables/demo/load 
{ 
    "relativePath": "Files/demo.csv", 
    "pathType": "File", 
    "mode": "overwrite", 
    "formatOptions": 
    { 
        "header": true, 
        "delimiter": ",", 
        "format": "CSV" 
    } 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However for me this returns :&amp;nbsp;"An invalid request has been received: ' 'loadTableRequest' is a required parameter.'."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How should I add this parameter to the request?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 14:19:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-API-Table-load-required-parameters/m-p/4050886#M3154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-19T14:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric API Table load required parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-API-Table-load-required-parameters/m-p/4053106#M3184</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, note that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the Fabric REST API, you first need to get a Microsoft Entra token for the Fabric service. Then use the token in the authorization header of the API call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can click on the official document below to learn:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/articles/get-started/fabric-api-quickstart" target="_blank"&gt;Fabric API quickstart - Microsoft Fabric REST APIs | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, this API is asynchronous, so it requires three steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use the OneLake API to upload files and folders to the "Files" section of your lakehouse.&lt;/LI&gt;
&lt;LI&gt;Submit the payload to the Table API request.&lt;/LI&gt;
&lt;LI&gt;Track the status of the operation until it completes.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, run the following command in the notebook corresponding to your lakehouse, replacing &lt;STRONG&gt;"YOUR_ACCESS_TOKEN", {workspaceId}, {lakehouseId}&lt;/STRONG&gt;, and the &lt;STRONG&gt;products&lt;/STRONG&gt; table name with the appropriate values.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import requests

url = https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId} /tables/products/load
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
data = {
   
       "relativePath": "Files/products.csv",
       "pathType": "File",
       "mode": "overwrite",
       "formatOptions": {
           "header": True,
           "delimiter": ",",
           "format": "CSV"
       }
   
}

response = requests.post(url, headers=headers, json=data)

print(response.status_code)
print(response.json())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran it successfully.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vhuijieymsft_0-1721627462367.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1136126i74E9726554835087/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vhuijieymsft_0-1721627462367.png" alt="vhuijieymsft_0-1721627462367.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 05:52:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-API-Table-load-required-parameters/m-p/4053106#M3184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-22T05:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric API Table load required parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-API-Table-load-required-parameters/m-p/4053244#M3185</link>
      <description>&lt;P&gt;Thank you, the following was actually missing in my request&lt;/P&gt;&lt;PRE&gt;"Content-Type": "application/json"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;btw, is there any other documentation about this api endpoint? What if I want to go beyond this example and load multiple parquet files from a folder?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 07:14:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Fabric-API-Table-load-required-parameters/m-p/4053244#M3185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-22T07:14:57Z</dc:date>
    </item>
  </channel>
</rss>

