<?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: Bug? Unity Catalog incompatible with Sparklyr in RStudio (on Driver) and as well if used on one cluster from multiple notebooks? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/17033#M11111</link>
    <description>&lt;P&gt;Hi @Kaniz Fatma​! Maybe you can point us into the right direction?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 21:18:04 GMT</pubDate>
    <dc:creator>thomann</dc:creator>
    <dc:date>2022-12-14T21:18:04Z</dc:date>
    <item>
      <title>Bug? Unity Catalog incompatible with Sparklyr in RStudio (on Driver) and as well if used on one cluster from multiple notebooks?</title>
      <link>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/17032#M11110</link>
      <description>&lt;P&gt;If I start a RStudio Server with in cluster init script as described &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sparkr/rstudio#install-rstudio-server-open-source-edition" alt="https://learn.microsoft.com/en-us/azure/databricks/sparkr/rstudio#install-rstudio-server-open-source-edition" target="_blank"&gt;here&lt;/A&gt; in a Unity Catalog Cluster the sparklyr connection fails with an error about a missing Credential Scope.=L&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1018iEDC7D4E8923F38A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;I tried it both in 11.3LTS and 12.0 Beta. I tried it only in a Personal Single Node Cluster. I did &lt;B&gt;not&lt;/B&gt; try it out with a remote RStudio (via databricks connect).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks like a major incompatibility?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something similar happens when I open 2 identical notebooks each with the following cell:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;library(sparklyr)
library(tidyverse)
sc &amp;lt;- spark_connect(method="databricks")
&amp;nbsp;
sdf &amp;lt;- sc %&amp;gt;% sdf_sql("SELECT * FROM samples.nyctaxi.trips")
sdf&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you run it in the first notebook you get the desired outcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you then run it on the same cluster (without restarting the cluster) you get the following error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Error : org.apache.spark.SparkException: Missing Credential Scope. 
	at com.databricks.unity.UCSDriver$Manager.$anonfun$scope$1(UCSDriver.scala:103)
	at scala.Option.getOrElse(Option.scala:189)
	at com.databricks.unity.UCSDriver$Manager.scope(UCSDriver.scala:103)
	at com.databricks.unity.UCSDriver$Manager.currentScope(UCSDriver.scala:97)
	at com.databricks.unity.UnityCredentialScope$.currentScope(UnityCredentialScope.scala:100)
	at com.databricks.unity.UnityCredentialScope$.getSAMRegistry(UnityCredentialScope.scala:120)
	at com.databricks.unity.SAMRegistry$.getSAMOpt(SAMRegistry.scala:346)
	at com.databricks.unity.CredentialScopeSQLHelper$.registerPathIfMissing(CredentialScopeSQLHelper.scala:204)
	at com.databricks.sql.transaction.tahoe.DeltaLog$.apply(DeltaLog.scala:853)
	at com.databricks.sql.transaction.tahoe.DeltaLog$.apply(DeltaLog.scala:774)
	at com.databricks.sql.transaction.tahoe.DeltaLog$.apply(DeltaLog.scala:754)
	at com.databricks.sql.transaction.tahoe.DeltaLog$.forTable(DeltaLog.scala:701)
	at com.databricks.sql.transaction.tahoe.DeltaLog$.$anonfun$forTableWithSnapshot$1(DeltaLog.scala:780)
	at com.databricks.sql.transaction.tahoe.DeltaLog$.withFreshSnapshot(DeltaLog.scala:806)
	at com.databricks.sql.transaction.tahoe.DeltaLog$.forTableWithSnapshot(DeltaLog.scala:780)
	at com.databricks.sql.managedcatalog.SampleTable.readSchema(SampleTables.scala:109)
	at com.databricks.sql.managedcatalog.ManagedCatalogSessionCatalog.$anonfun$getSampleTableMetadata$1(ManagedCatalogSessionCatalog.scala:955)
	at scala.Option.map(Option.scala:230)
	at com.databricks.sql.managedcatalog.ManagedCatalogSessionCatalog.getSampleTableMetadata(M[...]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This happens:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Both in 11.3LTS and 12.0 Beta&lt;/LI&gt;&lt;LI&gt;Also if you only read from dbfs: spark_read_delta(sc, 'dbfs:/databricks-datasets/learning-spark-v2/people/people-10m.delta')&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Also if you have a multiple task job and run it on a job cluster.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It does not happen in SparkR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is already a StackOverflow Question about this: &lt;A href="https://stackoverflow.com/questions/74575249/sparklyr-multiple-databricks-notebooks-second-connections-fails-with-org-apache" alt="https://stackoverflow.com/questions/74575249/sparklyr-multiple-databricks-notebooks-second-connections-fails-with-org-apache" target="_blank"&gt;https://stackoverflow.com/questions/74575249/sparklyr-multiple-databricks-notebooks-second-connections-fails-with-org-apache&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 16:48:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/17032#M11110</guid>
      <dc:creator>thomann</dc:creator>
      <dc:date>2022-12-13T16:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bug? Unity Catalog incompatible with Sparklyr in RStudio (on Driver) and as well if used on one cluster from multiple notebooks?</title>
      <link>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/17033#M11111</link>
      <description>&lt;P&gt;Hi @Kaniz Fatma​! Maybe you can point us into the right direction?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 21:18:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/17033#M11111</guid>
      <dc:creator>thomann</dc:creator>
      <dc:date>2022-12-14T21:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bug? Unity Catalog incompatible with Sparklyr in RStudio (on Driver) and as well if used on one cluster from multiple notebooks?</title>
      <link>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/17036#M11114</link>
      <description>&lt;P&gt;Thanks @Kaniz Fatma​&amp;nbsp;for your answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, we have the problem on Azure Databricks. We did not test it on AWS yet. Does that make a difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also - as written in the Question - the problem happens (actually more pressing) directly in the Databricks Notebooks themselves, if a second Databricks Notebook using R is connecting to the same Cluster. This happens both in interactivice clusters as well as when several steps in a Workflow use R Notebooks with Unity Catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give us some pointer (in the documentation, source code ?), what AWS/Azure Credentials you mean and how we should set them up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best, Philipp&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 19:19:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/17036#M11114</guid>
      <dc:creator>thomann</dc:creator>
      <dc:date>2023-02-28T19:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bug? Unity Catalog incompatible with Sparklyr in RStudio (on Driver) and as well if used on one</title>
      <link>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/46337#M28047</link>
      <description>&lt;P&gt;Have run into this issue as well. Let me know if there was any resolution&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 26 Sep 2023 23:42:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bug-unity-catalog-incompatible-with-sparklyr-in-rstudio-on/m-p/46337#M28047</guid>
      <dc:creator>kunalmishra9</dc:creator>
      <dc:date>2023-09-26T23:42:07Z</dc:date>
    </item>
  </channel>
</rss>

