<?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 download Large size .PBIX file from PBI service in less time using REST API in Python? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-download-Large-size-PBIX-file-from-PBI-service-in-less/m-p/2324674#M34281</link>
    <description>&lt;P&gt;We are able to download PBIX file from PBI service using REST API in Python.&lt;BR /&gt;For small size files it takes few minutes but it takes more than 4-5 hours to download 840MB file.&lt;BR /&gt;&lt;SPAN&gt;How to download Large size .PBIX file from PBI service in less time using REST API in Python?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find below sample code used for same :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with&amp;nbsp;requests.get(url,&amp;nbsp;headers=headers,&amp;nbsp;params=params,&amp;nbsp;stream=True)&amp;nbsp;as&amp;nbsp;response:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.raise_for_status()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;with&amp;nbsp;open(pbix_fileName,&amp;nbsp;'wb')&amp;nbsp;as&amp;nbsp;report_file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;for&amp;nbsp;chunk&amp;nbsp;in&amp;nbsp;response.iter_content(chunk_size=1024&amp;nbsp;*&amp;nbsp;8): &amp;nbsp;# 1MB chunks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;if&amp;nbsp;chunk:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; report_file.write(chunk)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; report_file.flush()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; os.fsync(report_file.fileno())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;print("success!")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Feb 2022 06:39:58 GMT</pubDate>
    <dc:creator>pbi_sujay</dc:creator>
    <dc:date>2022-02-08T06:39:58Z</dc:date>
    <item>
      <title>How to download Large size .PBIX file from PBI service in less time using REST API in Python?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-download-Large-size-PBIX-file-from-PBI-service-in-less/m-p/2324674#M34281</link>
      <description>&lt;P&gt;We are able to download PBIX file from PBI service using REST API in Python.&lt;BR /&gt;For small size files it takes few minutes but it takes more than 4-5 hours to download 840MB file.&lt;BR /&gt;&lt;SPAN&gt;How to download Large size .PBIX file from PBI service in less time using REST API in Python?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find below sample code used for same :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with&amp;nbsp;requests.get(url,&amp;nbsp;headers=headers,&amp;nbsp;params=params,&amp;nbsp;stream=True)&amp;nbsp;as&amp;nbsp;response:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.raise_for_status()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;with&amp;nbsp;open(pbix_fileName,&amp;nbsp;'wb')&amp;nbsp;as&amp;nbsp;report_file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;for&amp;nbsp;chunk&amp;nbsp;in&amp;nbsp;response.iter_content(chunk_size=1024&amp;nbsp;*&amp;nbsp;8): &amp;nbsp;# 1MB chunks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;if&amp;nbsp;chunk:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; report_file.write(chunk)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; report_file.flush()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; os.fsync(report_file.fileno())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;print("success!")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 06:39:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-download-Large-size-PBIX-file-from-PBI-service-in-less/m-p/2324674#M34281</guid>
      <dc:creator>pbi_sujay</dc:creator>
      <dc:date>2022-02-08T06:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to download Large size .PBIX file from PBI service in less time using REST API in Python?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-download-Large-size-PBIX-file-from-PBI-service-in-less/m-p/2332880#M34338</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/351571"&gt;@pbi_sujay&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can refer to the sample:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/cmberryau/pypowerbi/blob/master/pypowerbi/reports.py" target="_self" rel="nofollow noopener noreferrer"&gt;https://github.com/cmberryau/pypowerbi/blob/master/pypowerbi/reports.py&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details,you can refer to this blog:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.datalineo.com/post/power-bi-rest-api-with-python-and-microsoft-authentication-library-msal" target="_self" rel="nofollow noopener noreferrer"&gt;https://www.datalineo.com/post/power-bi-rest-api-with-python-and-microsoft-authentication-library-ms...&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 09:16:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-download-Large-size-PBIX-file-from-PBI-service-in-less/m-p/2332880#M34338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-11T09:16:51Z</dc:date>
    </item>
  </channel>
</rss>

