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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2022 05:11 AM
We are trying to fetch notebook context in our Job logging workflow.
current_context = dbutils.notebook.entry_point.getDbutils().notebook().getContext().toJson()
We were able to access this in DBR 10.4 custom mode but in DBR 10.4 & 11.2 (Shared Mode) we get the attached error.
Has the method to access notebook context change in newer DBR version or it's not available at all ?
- Labels:
-
11.2 LTS
-
Community Edition
-
DBR
-
Notebook Context
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 08:06 AM
Same issue here. Tested on shared clusters up to the latest DBR version 13.1. All give the same error:
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
With a Single user cluster there are no issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 08:15 AM
![](/skins/images/8C2A30E5B696B676846234E4B14F2C7B/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/8C2A30E5B696B676846234E4B14F2C7B/responsive_peak/images/icon_anonymous_message.png)