<?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 Query ML Endpoint with R and Curl in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/query-ml-endpoint-with-r-and-curl/m-p/57808#M2879</link>
    <description>&lt;P&gt;I am trying to get a prediction by querying the ML Endpoint on Azure Databricks with R.&amp;nbsp;&lt;BR /&gt;I'm not sure what is the format of the expected data. Is there any other problem with this code?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="R Code.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/5869i1D25B857D8E8EF1A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="R Code.png" alt="R Code.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 17:21:18 GMT</pubDate>
    <dc:creator>BogdanV</dc:creator>
    <dc:date>2024-01-18T17:21:18Z</dc:date>
    <item>
      <title>Query ML Endpoint with R and Curl</title>
      <link>https://community.databricks.com/t5/machine-learning/query-ml-endpoint-with-r-and-curl/m-p/57808#M2879</link>
      <description>&lt;P&gt;I am trying to get a prediction by querying the ML Endpoint on Azure Databricks with R.&amp;nbsp;&lt;BR /&gt;I'm not sure what is the format of the expected data. Is there any other problem with this code?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="R Code.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/5869i1D25B857D8E8EF1A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="R Code.png" alt="R Code.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 17:21:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/query-ml-endpoint-with-r-and-curl/m-p/57808#M2879</guid>
      <dc:creator>BogdanV</dc:creator>
      <dc:date>2024-01-18T17:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Query ML Endpoint with R and Curl</title>
      <link>https://community.databricks.com/t5/machine-learning/query-ml-endpoint-with-r-and-curl/m-p/64728#M3156</link>
      <description>&lt;P&gt;Hi Kaniz,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to find the solution. You should post this in the examples when you click "Query Endpoint"&lt;BR /&gt;You only have code for&amp;nbsp;&lt;SPAN&gt;Browser,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Curl,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Python,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;SQL. You should add a tab for R&lt;BR /&gt;Here is the solution:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;library(httr)&lt;BR /&gt;url &amp;lt;- "&lt;A href="https://adb-********.azuredatabricks.net/serving-endpoints/********/invocations" target="_blank"&gt;https://adb-********.azuredatabricks.net/serving-endpoints/********/invocations&lt;/A&gt;"&lt;BR /&gt;db_token="dap*******"&lt;BR /&gt;headers &amp;lt;- add_headers('Authorization'==paste('Bearer', db_token, sep=' '),&lt;BR /&gt;"Content-Type" = "application/json")&lt;/P&gt;&lt;P&gt;data='{"dataframe_split": {"columns": ["***columnName1String***", "***ColumnName2Integer****"], "data": [["val11", val12], ["val21", val22], ["val31", val32]]}}'&lt;BR /&gt;response= POST(url,headers,body=data)&lt;BR /&gt;results &amp;lt;- content(response, "parsed")&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 02:32:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/query-ml-endpoint-with-r-and-curl/m-p/64728#M3156</guid>
      <dc:creator>BogdanV</dc:creator>
      <dc:date>2024-03-27T02:32:00Z</dc:date>
    </item>
  </channel>
</rss>

