<?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: REST API Identification of Import vs Direct Query Datasets in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/309144#M9116</link>
    <description>&lt;P&gt;Update in case others are looking for this: the Get Datasources call no longer returns a BadRequest, but a datasource with a null Name and ConnectionString, so I've had to adapt my code accordingly.&amp;nbsp; I'm also wondering if the response might change again in the future, if/when Import dataset connection strings can ever be changed via API.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 20:46:11 GMT</pubDate>
    <dc:creator>rmiranti</dc:creator>
    <dc:date>2017-11-22T20:46:11Z</dc:date>
    <item>
      <title>REST API Identification of Import vs Direct Query Datasets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/249555#M7739</link>
      <description>&lt;P&gt;I am using the C# SDK and the REST API to do a lot programmatically with a large number of reports, created in Power BI Desktop and connected to databases through either Direct Query or Import Mode.&amp;nbsp; Since there is different functionality between these two modes, I want to be able to identify whether a particular dataset is Direct Query or Import.&amp;nbsp; So far my only way to detect this is to attempt a method that works with Direct Query and, if it throws an exception("Invalid dataset" or "Bad Request"), try the method for Import mode.&amp;nbsp; That should not be the best way to determine the dataset mode, but I'm not sure how else to do it.&amp;nbsp; Are there any good ways to identify the difference between Direct Query and Import datasets without relying on exceptions?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 20:58:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/249555#M7739</guid>
      <dc:creator>rmiranti</dc:creator>
      <dc:date>2017-09-11T20:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Identification of Import vs Direct Query Datasets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/249809#M7741</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/41646"&gt;@rmiranti&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I am using the C# SDK and the REST API to do a lot programmatically with a large number of reports, created in Power BI Desktop and connected to databases through either Direct Query or Import Mode.&amp;nbsp; Since there is different functionality between these two modes, I want to be able to identify whether a particular dataset is Direct Query or Import.&amp;nbsp; So far my only way to detect this is to attempt a &lt;STRONG&gt;method&lt;/STRONG&gt; that works with Direct Query and, if it throws an exception("Invalid dataset" or "Bad Request"), try the method for Import mode.&amp;nbsp; That should not be the best way to determine the dataset mode, but I'm not sure how else to do it.&amp;nbsp; Are there any good ways to identify the difference between Direct Query and Import datasets without relying on exceptions?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/41646"&gt;@rmiranti&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;AFAIK, there's no more elegant way &amp;nbsp;to find out dataset in DQ or Import mode than the "method" you mentioned.&lt;/P&gt;
&lt;P&gt;By the way, is the method calling the&amp;nbsp;&lt;A href="https://msdn.microsoft.com/en-US/library/mt732873.aspx" target="_self"&gt;Get Datasources&lt;/A&gt;&amp;nbsp;REST API?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 06:49:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/249809#M7741</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-09-12T06:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Identification of Import vs Direct Query Datasets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/250265#M7756</link>
      <description>&lt;P&gt;The Set All Connections call is the one I've been using, since I need to change connection strings (but this will currently only work for DirectQuery datasets).&amp;nbsp; In seeking other options, I found that Get Datasources yields the same result: a status code "BadRequest" with the message "Invalid dataset. This API can only be called on a DirectQuery dataset."&amp;nbsp; So it appears that checking for this response from one of those calls is the only way to identify which mode is used?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 18:21:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/250265#M7756</guid>
      <dc:creator>rmiranti</dc:creator>
      <dc:date>2017-09-12T18:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Identification of Import vs Direct Query Datasets</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/309144#M9116</link>
      <description>&lt;P&gt;Update in case others are looking for this: the Get Datasources call no longer returns a BadRequest, but a datasource with a null Name and ConnectionString, so I've had to adapt my code accordingly.&amp;nbsp; I'm also wondering if the response might change again in the future, if/when Import dataset connection strings can ever be changed via API.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 20:46:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Identification-of-Import-vs-Direct-Query-Datasets/m-p/309144#M9116</guid>
      <dc:creator>rmiranti</dc:creator>
      <dc:date>2017-11-22T20:46:11Z</dc:date>
    </item>
  </channel>
</rss>

