<?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: Custom data connector schema in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/693024#M19418</link>
    <description>&lt;P&gt;Hey again, turns out the custom function in PQ UI &lt;EM&gt;Determine Data Types&lt;/EM&gt; works very well, and i will go with that, thank you for the suggestion.&amp;nbsp;&lt;BR /&gt;Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2019 16:50:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-16T16:50:55Z</dc:date>
    <item>
      <title>Custom data connector schema</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/692654#M19409</link>
      <description>&lt;P&gt;Hey guys,&lt;BR /&gt;Do you know the best way (if there is one) to program a custom data connector to receive a bunch of json data and parse the right data types of columns? So when i access the data on Power BI it shows the correct data type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Context&lt;/U&gt;: i get my data from a REST API with a custom made Web Service that gets a &lt;STRONG&gt;Query_ID&lt;/STRONG&gt; and retreives that data.&lt;/P&gt;&lt;P&gt;I read&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-query/samples/trippin/7-advancedschema/readme" target="_self"&gt;Advanced Schema&lt;/A&gt;&amp;nbsp;of msdocs and didn't find an answer.&amp;nbsp;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 10:11:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/692654#M19409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-16T10:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom data connector schema</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/692833#M19416</link>
      <description>&lt;P&gt;Does the API also provide metadata or response headers that includes data type definitions for that resource? If so, you could just parse those definitions and map them to Power BI data types. I've done &lt;A href="https://github.com/tonmcg/powersocrata/blob/6e27f950148a3254f5fe1a532292be9d9a97106a/M/Socrata.ReadData.pq#L163" target="_blank" rel="noopener"&gt;something similar&lt;/A&gt; with resources on the Socrata Open Data API. Here's how that API define data types for columns in the &lt;A href="https://dev.socrata.com/foundry/data.cityofchicago.org/ydr8-5enu" target="_blank" rel="noopener"&gt;Building Permits resource&lt;/A&gt;, which it includes in the response headers (scroll down to the Fields section of the page).&lt;/P&gt;&lt;P&gt;If your API adheres to the OData specification, the resource should have a corresponding metadata resource that defines data types. The TripPin API example is a good one, because it hews closely to the full OData spec.&lt;/P&gt;&lt;P&gt;For example, a &lt;A href="https://services.odata.org/V4/(S(iozqad3i0xn5ejbqa23dpysy))/TripPinServiceRW/People" target="_blank" rel="noopener"&gt;call to the &lt;FONT face="courier new,courier"&gt;People&lt;/FONT&gt; resource&lt;/A&gt; provides a link to the &lt;A href="https://services.odata.org/V4/(S(iozqad3i0xn5ejbqa23dpysy))/TripPinServiceRW/$metadata#People" target="_blank" rel="noopener"&gt;&lt;FONT face="courier new,courier"&gt;People&lt;/FONT&gt; metadata resource&lt;/A&gt;, which contains data types for the columns in the original &lt;FONT face="courier new,courier"&gt;People&lt;/FONT&gt; resource.&lt;/P&gt;&lt;P&gt;If the API does not provide data types in a metadata resource or within the response headers, you could also just use the Determine Data Types function from the Power Query Editor UI to define data types.&lt;/P&gt;&lt;P&gt;Can you provide an example that contains both the JSON data and if possible, the data type definitions supplied by the API? If this is a public API, can you share the root endpoint?&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 13:54:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/692833#M19416</guid>
      <dc:creator>tonmcg</dc:creator>
      <dc:date>2019-05-16T13:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom data connector schema</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/692917#M19417</link>
      <description>&lt;P&gt;Hi, thanks for answering.&lt;BR /&gt;I don't&amp;nbsp;think i understand well how metadata is represented in http headers.&lt;BR /&gt;The headers of the response are like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="img2.png" style="width: 316px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/164908i9D1AB04340770745/image-size/medium?v=v2&amp;amp;px=400" role="button" title="img2.png" alt="img2.png" /&gt;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, the API is not Open Data, and my pq connector reaches out to a custom made WS to receive an &lt;STRONG&gt;Url&lt;/STRONG&gt;, &lt;STRONG&gt;QueryID&lt;/STRONG&gt; and &lt;STRONG&gt;Parameters&lt;/STRONG&gt;.&amp;nbsp;&amp;nbsp;Here is the connector code and result in json:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="img3.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/164910i114D36CCB83F705D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="img3.png" alt="img3.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="img4.png" style="width: 200px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/164914i7E6517AEEFBF2733/image-size/small?v=v2&amp;amp;px=200" role="button" title="img4.png" alt="img4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I can see in the TripPin example that we have access to a metadata column.&lt;BR /&gt;In my case, i see the data types of each &lt;EM&gt;JProperty&lt;/EM&gt; in another &lt;EM&gt;JArray&lt;/EM&gt; of the response, that i chose not to retreive in the Web Service, because the actual data is on dataSource. I have thought about fetching that dataType in the WS, but i don't know how to insert it in the result. Is it a good approach?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="img1.png" style="width: 251px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/164918iE266AB78FC5F8557/image-size/medium?v=v2&amp;amp;px=400" role="button" title="img1.png" alt="img1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;About the &lt;EM&gt;Determine Data Types&lt;/EM&gt; function from the Power Query Editor UI, it doesn't get all data types right. My goal would be for the connector to determine the data types given any QueryID.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is the first project of my internship, so i'm not yet very familiar with how data requests work.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 14:54:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/692917#M19417</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-16T14:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Custom data connector schema</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/693024#M19418</link>
      <description>&lt;P&gt;Hey again, turns out the custom function in PQ UI &lt;EM&gt;Determine Data Types&lt;/EM&gt; works very well, and i will go with that, thank you for the suggestion.&amp;nbsp;&lt;BR /&gt;Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 16:50:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-data-connector-schema/m-p/693024#M19418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-16T16:50:55Z</dc:date>
    </item>
  </channel>
</rss>

