Collaborate using Databricks notebooks

This page describes how to give coworkers access to a notebook and how you can leave comments in a notebook.

Note

Access control is available only in the Premium plan or above.

Share a notebook

To share a notebook with a coworker, click Notebook header share button at the top of the notebook. The Sharing dialog opens, which you can use to select who to share the notebook with and what level of access they have.

You can also manage permissions in a fully automated setup using Databricks Terraform provider and databricks_permissions.

Notebook permissions

You can assign five permission levels to notebooks: NO PERMISSIONS, CAN READ, CAN RUN, CAN EDIT, and CAN MANAGE. The table lists the abilities for each permission.

Ability

NO PERMISSIONS

CAN READ

CAN RUN

CAN EDIT

CAN MANAGE

View cells

x

x

x

x

Comment

x

x

x

x

Run via %run or notebook workflows

x

x

x

x

Attach and detach notebooks

x

x

x

Run commands

x

x

x

Edit cells

x

x

Modify permissions

x

Workspace admins have the CAN MANAGE permission on all notebooks in their workspace. Users automatically have the CAN MANAGE permission for notebooks they create.

Manage notebook permission with folders

You can manage notebook permissions by adding notebook to folders. Notebooks in a folder inherit all permissions settings of that folder. For example, a user that has CAN RUN permission on a folder has CAN RUN permission on the queries in that folder. To learn about configuring permissions on folders, see Folder ACLs.

To learn more about organizing notebooks into folders, see Workspace browser.

Command comments

You can have discussions with collaborators using command comments.

To toggle the Comments sidebar, click the Comments icon Toggle notebook comments in the notebook’s right sidebar.

To add a comment to a command:

  1. Highlight the command text and click the comment bubble:

    Open comments
  2. Add your comment and click Comment.

    Add comment

To edit, delete, or reply to a comment, click the comment and choose an action.

Edit comment