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 to change the runtime.
Share a notebook from the notebook editor
You can share a notebook directly from the notebook editor.
- Sign in as a user with privileges to create and edit notebooks.
- On the navigation bar of your organization, click Notebook.
The Notebooks home page appears.
- Open a notebook or create a notebook.
The notebook editor opens.
- On the top ribbon of the notebook editor, click Share.
The Share notebook pane appears, displaying the notebook's current sharing settings.
- Click Share in the pane to open the share window.
- 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 in the library cannot be edited by others.
Code snippets in a library are automatically shared when the library is shared.
To share a code snippet library from the notebook editor, do the following:
- Sign in as a user with privileges to create and edit notebooks.
- On the navigation bar of your organization, click Notebook.
The Notebooks home page appears.
- Open a notebook or create a notebook.
The notebook editor opens.
- On the top ribbon of the notebook editor, click Code snippets.
- In the Code snippets pane, click More options, and click Manage library items.
- Click the Share button for the code snippet library you want to share.
- In the Share window, choose the sharing level for the code snippet library, and click Save.
- Click Done.
You can also update a code snippet library's sharing settings from its item page.
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 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.