<?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: Duplicate Datasets after Uploading Reports with RESTful API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Duplicate-Datasets-after-Uploading-Reports-with-RESTful-API/m-p/400710#M11939</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How you upload the updated report here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no delete DataSet API available under Power BI Embedded, based on the documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/mt203551.aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/mt203551.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If here you are uploading report from PBIX file, then you could take use of the import API to overwrite the existing dataset:&lt;/P&gt;&lt;P&gt;Check the Import API below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/mt243840.aspx" target="_self"&gt;Create Import&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the dataset is well configured for data refreshing, then you could rebind the report to the Old DataSet through the Rebind report API:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/mt784672.aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/mt784672.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 06:44:55 GMT</pubDate>
    <dc:creator>v-micsh-msft</dc:creator>
    <dc:date>2018-04-20T06:44:55Z</dc:date>
    <item>
      <title>Duplicate Datasets after Uploading Reports with RESTful API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Duplicate-Datasets-after-Uploading-Reports-with-RESTful-API/m-p/398484#M11868</link>
      <description>&lt;P&gt;Hello Developer Community,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We've created a customer facing product using Power BI embedded. We have also created a tool to automate the uploading of our Power BI reports using the Power BI RESTful API. Prior to uploading a report update, we delete the existing report (if exists) then upload the update as shown below..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp; String reportId = GetReportID(report.reportName, report.groupId, client);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (reportId != null)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&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; &amp;nbsp; &amp;nbsp; client.Reports.DeleteReportInGroup(report.groupId,reportId.ToString());&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&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; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have seen that the data sets from previous versions of the report stay behind and they are auto-refreshing these causes our Azure SQL Server DTU’s to be constantly in use. We have about 20 reports and we are constantly uploading updates, therefore the number of datasets being left behind are increasing. You can see our datasets being duplicated every time we upload a new report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/91116iB18B4C8C4BFFD729/image-size/medium?v=1.0&amp;amp;px=400" border="0" alt="PBI_Dup_DS.JPG" title="PBI_Dup_DS.JPG" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is (and it may have an obvious answer, If so, apologize in advance) , should we manually delete the dataset first, then delete the report every time we update a report using the RESTful API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If so, is something like the below code something we need to add prior to the client.Reports.DeleteReportInGroup(..) method??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;var dsId = GetDatasetID(report.reportName, report.groupId, client);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;client.Datasets.DeleteDatasetById(dsId.ToString());&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also seen posts recommending to upload once, then change the report to point to the dataset on the Service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure how is best to proceed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all in advance.&lt;/P&gt;&lt;P&gt;Emilio&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 21:10:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Duplicate-Datasets-after-Uploading-Reports-with-RESTful-API/m-p/398484#M11868</guid>
      <dc:creator>EChemali</dc:creator>
      <dc:date>2018-04-17T21:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate Datasets after Uploading Reports with RESTful API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Duplicate-Datasets-after-Uploading-Reports-with-RESTful-API/m-p/400710#M11939</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How you upload the updated report here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no delete DataSet API available under Power BI Embedded, based on the documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/mt203551.aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/mt203551.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If here you are uploading report from PBIX file, then you could take use of the import API to overwrite the existing dataset:&lt;/P&gt;&lt;P&gt;Check the Import API below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/mt243840.aspx" target="_self"&gt;Create Import&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the dataset is well configured for data refreshing, then you could rebind the report to the Old DataSet through the Rebind report API:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/mt784672.aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/mt784672.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 06:44:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Duplicate-Datasets-after-Uploading-Reports-with-RESTful-API/m-p/400710#M11939</guid>
      <dc:creator>v-micsh-msft</dc:creator>
      <dc:date>2018-04-20T06:44:55Z</dc:date>
    </item>
  </channel>
</rss>

