<?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: Calling Azure ML Web Service from Power BI in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/238503#M7484</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/12199"&gt;@dkay84_PowerBI&lt;/a&gt;&amp;nbsp;- this code works only in desktop right? not in powerbi.com&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Aug 2017 20:28:09 GMT</pubDate>
    <dc:creator>ASHOKKPIN</dc:creator>
    <dc:date>2017-08-24T20:28:09Z</dc:date>
    <item>
      <title>Calling Azure ML Web Service from Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/76500#M2631</link>
      <description>&lt;P&gt;I have looked at other posts covering this topic, but none seem to explain, in a way I can comprehend, how to do what I want to acheive. &amp;nbsp;I am pulling in Twitter data via API directly into Power BI. &amp;nbsp;I have been using a custom function to call the Microsoft Cognitive Services Sentiment Analysis API to score the Tweets. &amp;nbsp;However, I have an Azure ML Web Service for text analytics that I want to use instead of Microsoft's Cognitive Services.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to see the request URL and API key for a published web service in Azure ML. &amp;nbsp;I also know where to find the R code example. &amp;nbsp;I am not sure how to implement a call to this API directly in Power BI (either via API or R), but also, could it be possible to do the scoring with R directly in an R script in the query editor?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2016 15:47:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/76500#M2631</guid>
      <dc:creator>dkay84_PowerBI</dc:creator>
      <dc:date>2016-10-09T15:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Azure ML Web Service from Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/77049#M2661</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/12199"&gt;@dkay84_PowerBI﻿&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is your web service like? Currently Power BI doesn't support fetching data from Azure ML, you might choose "get data-&amp;gt;web" or call an api from Power Query.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 08:27:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/77049#M2661</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2016-10-11T08:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Azure ML Web Service from Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/77299#M2679</link>
      <description>&lt;P&gt;My code to call the Cognitive Services API looks as follows:&lt;/P&gt;&lt;PRE&gt;(Source as table) as any =&amp;gt;
let
    JsonRecords = Text.FromBinary(Json.FromValue(Source)),
    JsonRequest = "{""documents"": " &amp;amp; JsonRecords &amp;amp; "}",

    JsonContent = Text.ToBinary(JsonRequest, TextEncoding.Ascii),
    Response =
        Web.Contents("https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment?",
            [
                Headers = [#"Ocp-Apim-Subscription-Key"= "MY KEY",
                           #"Content-Type"="application/json", Accept="application/json"],
                Content=JsonContent 
            ]),
    JsonResponse = Json.Document(Response,1252)
in
    JsonResponse&lt;/PRE&gt;&lt;P&gt;Since the Azure ML web service gives a url and key, I&amp;nbsp;figured it would be possible to call it similar to the call above. &amp;nbsp;However, the structure of the call and the required headers is a bit different, and trying to figure out the required pieces from the Azure ML web service API page is difficult.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 15:26:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/77299#M2679</guid>
      <dc:creator>dkay84_PowerBI</dc:creator>
      <dc:date>2016-10-11T15:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Azure ML Web Service from Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/77459#M2690</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/12199"&gt;@dkay84_PowerBI&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;My code to call the Cognitive Services API looks as follows:&lt;/P&gt;
&lt;PRE&gt;(Source as table) as any =&amp;gt;
let
    JsonRecords = Text.FromBinary(Json.FromValue(Source)),
    JsonRequest = "{""documents"": " &amp;amp; JsonRecords &amp;amp; "}",

    JsonContent = Text.ToBinary(JsonRequest, TextEncoding.Ascii),
    Response =
        Web.Contents("https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment?",
            [
                Headers = [#"Ocp-Apim-Subscription-Key"= "MY KEY",
                           #"Content-Type"="application/json", Accept="application/json"],
                Content=JsonContent 
            ]),
    JsonResponse = Json.Document(Response,1252)
in
    JsonResponse&lt;/PRE&gt;
&lt;P&gt;Since the Azure ML web service gives a url and key, I&amp;nbsp;figured it would be possible to call it similar to the call above. &amp;nbsp;&lt;STRONG&gt;However, the structure of the call and the required headers is a bit different, and trying to figure out the required pieces from the Azure ML web service API page is difficult&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I know, http request is not language-specific, so either Power Query or any other language can send a request with proper request header. In your case, as you don't know how to apply the url and key,&lt;STRONG&gt; which is actually Azure ML specific&lt;/STRONG&gt;, then I suggest you firstly ask a question like "how to call the Azure ML web service API" in the dedicated &lt;A href="https://social.msdn.microsoft.com/forums/azure/en-US/home?forum=machinelearning" target="_self"&gt;Azure ML forum&lt;/A&gt;, then transplant the answer to Power Query.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 07:18:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/77459#M2690</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2016-10-12T07:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Azure ML Web Service from Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/238503#M7484</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/12199"&gt;@dkay84_PowerBI&lt;/a&gt;&amp;nbsp;- this code works only in desktop right? not in powerbi.com&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 20:28:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calling-Azure-ML-Web-Service-from-Power-BI/m-p/238503#M7484</guid>
      <dc:creator>ASHOKKPIN</dc:creator>
      <dc:date>2017-08-24T20:28:09Z</dc:date>
    </item>
  </channel>
</rss>

