<?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: implementation of R in notebook in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4018264#M2765</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/766014"&gt;@jccastelblancos&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .&lt;BR /&gt;In case if you have any resolution please do share that same with the community as it can be helpful to others . &lt;BR /&gt;Otherwise, will respond back with the more details and we will try to help . &lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 09:21:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-01T09:21:44Z</dc:date>
    <item>
      <title>implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4010036#M2687</link>
      <description>&lt;P&gt;Good evening and greetings to all&lt;/P&gt;&lt;P&gt;I come to this forum with the intention of requesting help with the following, load a table in a lakeHouse through a pipeline in the tables section&lt;/P&gt;&lt;P&gt;I am reading it with the read.df() method&lt;BR /&gt;So far there is no problem, the problem arises when I want to apply tidyverse methods&lt;/P&gt;&lt;P&gt;for example filter() returns an error like the following:&lt;/P&gt;&lt;P&gt;[1] "Error in UseMethod(\"filter\"): no applicable method for 'filter' applied to an object of class \"SparkDataFrame\""&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In fact, when I pass class() the object that returns is SparkDataFrame&lt;/P&gt;&lt;P&gt;I would like to be able to manipulate the data as I would with tidyverse, I have seen that this can be achieved&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/es-es/fabric/data-science/r-use-tidyverse" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/es-es/fabric/data-science/r-use-tidyverse&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but I don't know which route I should follow to be able to do it.&lt;/P&gt;&lt;P&gt;I appreciate any help&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 01:21:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4010036#M2687</guid>
      <dc:creator>jccastelblancos</dc:creator>
      <dc:date>2024-06-26T01:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4010466#M2692</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/766014"&gt;@jccastelblancos&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume that you have to convert the spark dataframe to a pandas dataframe. Probably this article will help you out on this:&amp;nbsp;&lt;A href="https://github.com/MicrosoftDocs/fabric-docs/blob/main/docs/data-science/read-write-pandas.md" target="_blank"&gt;fabric-docs/docs/data-science/read-write-pandas.md at main · MicrosoftDocs/fabric-docs · GitHub&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully, ths provides what you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 06:07:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4010466#M2692</guid>
      <dc:creator>TomMartens</dc:creator>
      <dc:date>2024-06-26T06:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4011317#M2694</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31"&gt;@TomMartens&lt;/a&gt;&amp;nbsp;&amp;nbsp;Thank you for answering so quickly.&lt;BR /&gt;In fact I have an object type:&lt;/P&gt;&lt;P&gt;[1] "SparkDataFrame"&lt;BR /&gt;attr(,"package")&lt;BR /&gt;[1] "SparkR"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the idea is to read the lakehouse or convert this object to a data.frame that can be manipulated with tidyverse&lt;/P&gt;&lt;P&gt;Can you guide me how to do it, please?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 13:02:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4011317#M2694</guid>
      <dc:creator>jccastelblancos</dc:creator>
      <dc:date>2024-06-26T13:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4011760#M2704</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/766014"&gt;@jccastelblancos&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my assumption that you have to use a Pandas dataframe was wrong, please excuse, but I'm not that much an R or being more precise a sparkR type.&lt;/P&gt;
&lt;P&gt;From this article:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/r-use-sparkr" target="_blank" rel="noopener"&gt;Use SparkR - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&amp;nbsp;the most essential part was this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;To access Lakehouse files using Spark packages, such as read.df or write.df, use its ADFS path or relative path for Spark. In the Lakehouse explorer, right click on the files or folder you want to access and copy its ADFS path or relative path for Spark from the contextual menu.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For this little demo I used the ADFS path, my code cell:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;%%sparkr
df &amp;lt;- read.df("abfss://.../DimDate", source= "parquet", header = "true", inferSchema = "true")
display(df)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I assume from here you can use TidyVerse:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/r-use-tidyverse" target="_blank" rel="noopener"&gt;Use Tidyverse - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully, this will help to tackle this challenge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 17:05:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4011760#M2704</guid>
      <dc:creator>TomMartens</dc:creator>
      <dc:date>2024-06-26T17:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4018264#M2765</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/766014"&gt;@jccastelblancos&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .&lt;BR /&gt;In case if you have any resolution please do share that same with the community as it can be helpful to others . &lt;BR /&gt;Otherwise, will respond back with the more details and we will try to help . &lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 09:21:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4018264#M2765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-01T09:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4021368#M2803</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31"&gt;@TomMartens&lt;/a&gt;&amp;nbsp;&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turned out to be much more complex than I thought, for now what I did was use createOrReplaceTempView to use sql with sql().&lt;BR /&gt;I expected it to be simpler but I have had countless problems with the use of SparkR, I think it is more designed for PySpark than for tidyverse. Still, I'll try a few more things. Thanks for the assistance&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 23:24:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4021368#M2803</guid>
      <dc:creator>jccastelblancos</dc:creator>
      <dc:date>2024-07-02T23:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4022041#M2809</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/766014"&gt;@jccastelblancos&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In case if you have any resolution please do share that same with the community as it can be helpful to others .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise, will respond back with the more details and we will try to help .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 06:46:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4022041#M2809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-03T06:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4026856#M2853</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/766014"&gt;@jccastelblancos&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Glad to know that you got some insights over your query. Please continue using Fabric Community on your further queries.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 10:24:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4026856#M2853</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-05T10:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4031212#M2898</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31"&gt;@TomMartens&lt;/a&gt;;&lt;/P&gt;&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a solution, which I think may be better, but for now it is my contribution in case anyone else facing the same solution has an alternative.&lt;BR /&gt;Since you are working as a pipeline to get the data to the lakehouse, change the destination so that it is not a table but a file, that is, files/. After this we can load it with readr and work with tidyverse, here the cumbersome thing is that to take it to tables I had no alternative but to write the files/processed table again, then read with SparkR from there to finally be able to use the write procedure which writes it to tables with overwrite or append mode. It is a longer route than I expected but I hope that if anyone knows a better alternative, let us know through this thread. Thanks to everyone who came to my aid.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 00:02:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4031212#M2898</guid>
      <dc:creator>jccastelblancos</dc:creator>
      <dc:date>2024-07-09T00:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: implementation of R in notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4215614#M4415</link>
      <description>&lt;P&gt;As an R user i would suggest you to use DBI and dbplyr to preserve the tidyverse logic in MS Fabric notebook.&lt;BR /&gt;Tables in lakehouse are in fact tables of a database.&lt;/P&gt;&lt;P&gt;- You can retrieve sql endpoint of that lakehouse&lt;BR /&gt;- Create a Service Principal in Azure and use it as a "super user":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;r code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;driver &amp;lt;- "ODBC Driver 18 for SQL Server"
server &amp;lt;- "put here the sql end point of lakehouse"
database &amp;lt;- "lakehouse, ie database name"
authentication &amp;lt;- "ActiveDirectoryServicePrincipal"
encrypt &amp;lt;- "True"
userid &amp;lt;- "id of the Service Principal"
password &amp;lt;- "Password of the Service Principal"
port &amp;lt;- 1433

connection_string &amp;lt;- glue("Driver={driver}; Server={server}; UID={userid}; PWD={password}; Port={port}; Database={database}; Encoding=UTF-8; Authentication={authentication}")

con &amp;lt;- DBI::dbConnect(odbc::odbc(), .connection_string = connection_string)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a clean way and you can read tables also from outside MS Fabric&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 17:41:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/implementation-of-R-in-notebook/m-p/4215614#M4415</guid>
      <dc:creator>FlavioLeccese</dc:creator>
      <dc:date>2024-10-03T17:41:40Z</dc:date>
    </item>
  </channel>
</rss>

