<?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 getContext() in dbutils.notebook not working in DBR 11.2 10.4 LTS Shared ModeIt's also working in no isolation Mode in DBR 11.2 in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/getcontext-in-dbutils-notebook-not-working-in-dbr-11-2-10-4-lts/m-p/31547#M22979</link>
    <description>&lt;P&gt;We are trying to fetch notebook context in our Job logging workflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;current_context = dbutils.notebook.entry_point.getDbutils().notebook().getContext().toJson()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We were able to access this in DBR 10.4 custom mode but in DBR 10.4 &amp;amp; 11.2 (Shared Mode) we get the attached error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has the method to access notebook context change in newer DBR version or it's not available at all ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1489i6DA458061112A405/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Mar 2025 13:14:47 GMT</pubDate>
    <dc:creator>parthsalvi</dc:creator>
    <dc:date>2025-03-21T13:14:47Z</dc:date>
    <item>
      <title>getContext() in dbutils.notebook not working in DBR 11.2 10.4 LTS Shared ModeIt's also working in no isolation Mode in DBR 11.2</title>
      <link>https://community.databricks.com/t5/data-engineering/getcontext-in-dbutils-notebook-not-working-in-dbr-11-2-10-4-lts/m-p/31547#M22979</link>
      <description>&lt;P&gt;We are trying to fetch notebook context in our Job logging workflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;current_context = dbutils.notebook.entry_point.getDbutils().notebook().getContext().toJson()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We were able to access this in DBR 10.4 custom mode but in DBR 10.4 &amp;amp; 11.2 (Shared Mode) we get the attached error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has the method to access notebook context change in newer DBR version or it's not available at all ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1489i6DA458061112A405/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:14:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getcontext-in-dbutils-notebook-not-working-in-dbr-11-2-10-4-lts/m-p/31547#M22979</guid>
      <dc:creator>parthsalvi</dc:creator>
      <dc:date>2025-03-21T13:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: getContext() in dbutils.notebook not working in DBR 11.2 10.4 LTS Shared Mode

It's also working in no isolation Mode in DBR 11.2</title>
      <link>https://community.databricks.com/t5/data-engineering/getcontext-in-dbutils-notebook-not-working-in-dbr-11-2-10-4-lts/m-p/31548#M22980</link>
      <description>&lt;P&gt;Same issue here. Tested on shared clusters up to the latest DBR version 13.1. All give the same error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;py4j.security.Py4JSecurityException: Method public java.lang.String com.databricks.backend.common.rpc.CommandContext.toJson() is not whitelisted on class class com.databricks.backend.common.rpc.CommandContext&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With a Single user cluster there are no issues&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 15:06:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getcontext-in-dbutils-notebook-not-working-in-dbr-11-2-10-4-lts/m-p/31548#M22980</guid>
      <dc:creator>Tjomme</dc:creator>
      <dc:date>2023-06-22T15:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: getContext() in dbutils.notebook not working in DBR 11.2 10.4 LTS Shared Mode

It's also working in no isolation Mode in DBR 11.2</title>
      <link>https://community.databricks.com/t5/data-engineering/getcontext-in-dbutils-notebook-not-working-in-dbr-11-2-10-4-lts/m-p/31549#M22981</link>
      <description>&lt;P&gt;See also: &lt;A href="https://community.databricks.com/s/question/0D58Y00009t95NHSAY/unity-catalog-shared-access-mode-dbutilsnotebookentrypointgetcontext-not-whitelisted" target="test_blank"&gt;https://community.databricks.com/s/question/0D58Y00009t95NHSAY/unity-catalog-shared-access-mode-dbutilsnotebookentrypointgetcontext-not-whitelisted&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 15:15:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/getcontext-in-dbutils-notebook-not-working-in-dbr-11-2-10-4-lts/m-p/31549#M22981</guid>
      <dc:creator>Tjomme</dc:creator>
      <dc:date>2023-06-22T15:15:20Z</dc:date>
    </item>
  </channel>
</rss>

