Skip to content

[ISSUE] notebook.entry_point.getDbutils().notebook().getContext().userName().get() not overridden in dbutils #930

Open
@Rooth123

Description

@Rooth123

Describe the bug
notebook.entry_point.getDbutils().notebook().getContext().userName().get() does not get overrriden when used through Databricks Connect / VS Code Extension. This causes the python file to error out.

To Reproduce
Steps to reproduce the behavior:

Insert notebook.entry_point.getDbutils().notebook().getContext().userName().get() into a .py file and attempt to run (after implementing spark and package imports etc.)
See error
Additional context

notebook.entry_point.getDbutils().notebook().getContext().notebookPath().get()

does get overriden however in [databricks.sdk.dbutils.py]([http://databricks.sdk.dbutils.py/]](http://databricks.sdk.dbutils.py/%5D) so can this same method be done for the userName() call?

proxy_override_paths = {
'notebook.entry_point.getDbutils().notebook().getContext().notebookPath().get()':
get_local_notebook_path,
'notebook.entry_point.getDbutils().notebook().getContext().userName().get()':
get_local_notebook_path,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions