Share a notebook

You can share a notebook you've created in the same way as any other item. By default, your notebook is only accessible to you; it does not appear in other users' search results and is not part of any group. Depending on your sharing privileges, you can share it.

Note:

When you share a notebook, other users can open and run the notebook. However, any changes they make to the notebook will be saved as a new copy that they will own. The changes they make are not saved to your notebook.

Prepare your notebook to be shared

Before you share a notebook, ensure the notebook can be opened and run successfully by others while preserving the integrity, security, and accessibility of your notebook.

  • Avoid storing usernames, passwords, credentials, or any other personal information in a notebook. Sharing a notebook with this content will expose it to others. If you need to connect to a GIS with a username and password, it is recommended that you only include the username in the code and wait to be prompted for the password on the interactive dialog box. To learn more about options for connecting to your GIS without a password, see Working with different authentication schemes.
  • Any item you have added to your notebook must also be shared with a member for that member to be able to view and use it in the notebook. Check the sharing properties for each item in your notebook before sharing the notebook.
  • You can use files from your user workspace in your notebooks. However, if you intend to share a notebook with others in your organization, upload the files to My Content, then add those items to your notebook. Share them with the members who will be viewing your notebook.
  • If your notebook uses the Advanced Notebook runtime, only users with the Advanced Notebook privilege can open and run the notebook when it is shared with them. See Specify the runtime of a notebook for steps on how to change the runtime.

Share a notebook from the notebook editor

You can share a notebook directly from the notebook editor.

  1. On the top ribbon of the notebook editor, click Share.

    The Share Notebook pane appears, displaying the notebook's current sharing settings.

  2. Click Share in the pane to open the share window.
  3. In the Share window, select the sharing level, and click Save.

    Your new sharing settings are shown in the pane.

You can update a notebook's sharing settings from the Content page or from the notebook editor itself. Both open the Share dialog box for the item, where you set and save sharing options.

Share code snippets

You can share code snippets by sharing the notebook code snippet libraries in which the snippets are stored, the same way you would other items you own. Sharing code snippet libraries allows you to share snippets of code that others can insert into their notebooks. Sharing a snippet library does not share the entire notebook and snippets cannot be edited by others.

Code snippets in a library are not automatically shared when the library is shared. To make snippets shared in the library, the snippet must be set to inherit the library's sharing level. A code snippet library can have a maximum of 100 snippets that are set to inherit the library's sharing level.

To set a snippet to inherit the share level of the library, do the following:

  1. On the top ribbon of the notebook editor, click Code snippets.
  2. Browse to the shared code snippet library and expand it to show the snippets.
  3. Click the Share button for the snippet you want to share with the library.
  4. In the Share window, choose Inherit, and click Save.

    The code snippet now inherits the same sharing level as the code snippet library.

Work on a shared notebook

When a notebook that has been shared is opened, a copy of that notebook is created and opened. The member with whom the notebook was shared is the owner of the new notebook copy; it runs in their own container and uses their own processing resources. Any changes they make to the notebook are only made in the new notebook copy.

You can search your organization's content to find a shared notebook, or access the notebook item from the group with which it is shared. Preview the notebook to view its content, and open the notebook from its item details page.

Ensure you only open shared notebooks from sources you trust. Any code you run in a shared notebook is run on your behalf, using your credentials. It's a best practice to review all cells in a shared notebook individually before running them, and to not use the Run All option when first opening a shared notebook.

Notebooks shared with you may reference files you do not have access to—they may be from items that haven't been shared with you, or may reside in the author's own user workspace. Contact the author if you receive such errors.