Create and edit notebooks
After you have installed the Zeppelin plugin and established a connection to a Zeppelin server, you can start working with your notebooks.
Right-click any notebook in the Big Data Tools window to open the context menu for the basic operations with the notebook. You can also use the following shortcuts:
Action | Shortcut |
---|---|
Copy | Control+C |
Paste | Control+V |
Cut | Control+X |
Move | F6 |
Rename | Shift+F6 |
Move to trash | Delete |
Create Note | Alt+Insert |
Zeppelin Connections Search | Control+F |
Creating notebooks
You can create a new notebook on the target server (remote notebook) or in the current DataGrip project (local notebook).
Create a remote notebook
In the Big Data Tools window, right-click any of the configured servers, folder, or note and select from the context menu or press Alt+Insert.
In the Create note dialog, enter the name of the notebook. You can use the
/
symbol to create a notebook within a folder. Click OK.The newly added notebook appears in the Big Data Tools window.
In DataGrip, you can create notebooks that are stored locally.
Create a local notebook
In the Project tool window, select the project root, press Alt+Insert, and select Zeppelin Notebook.
In the Create Zeppelin Notebook dialog, enter the notebook name and press Enter.
The newly added local notebook appears in the Project tool window.
You can search for a particular notebook in the established Zeppelin connections.
Search for a notebook
Select a target Zeppelin connection in the Big Data Tools window.
Click in the Big Data Tools tool window or press Control+F.
Type anything in the search box of the Find in window. The matching notebooks will be shown in the list of findings.
Editing notebooks
Once you create a notebook, it opens in the editor.
Type %sql
in the first line of the paragraph to enable SQL coding.
Work with paragraphs
Press Enter and start editing your notebook right away.
Any time you need to clone, move, or delete the current paragraph, just click to open a menu and select the required action.
You are not limited to adding only SQL code paragraphs. For example, to add any Markdown code, just add
%md
to the first line of the paragraph.
Note, that you don't need to save your edits. Auto-saving is triggered by various events, for example, closing a notebook or quitting the IDE. Nevertheless, you can import local notebooks and save remote notebooks on your machine.
Export and import notebooks
To import a notebook, right-click any directory, note, or Zeppelin connection node in the Big Data Tools window and select from the context menu. Specify a path to the target .json or .zpln file.
To export a notebook, right-click any notebook on a Zeppelin server in the Big Data Tools window and select from the context menu. Specify a path to the directory where you want to save the exported notebook.
Preview notebook contents using minimap
The minimap shows thumbnails of your code next in the editor. You can use it to quickly navigate and preview your code.
On the right side of your notebook, click to enable or disable the minimap.
Preview notebooks in a browser
To preview your notebook in the external browser, click on the notebook editor toolbar and select the corresponding option.
If needed, you can copy the link to the notebook to the clipboard.
Export notebook content into HTML
To export your notebook into an HTML file, click on the notebook toolbar and select
.Specify the filename and its location in your file system, then confirm the action.
If you save an HTML file in your project directory, the file appears in the Project tool window. To open it, right-click the file and select a target browser from the menu .
Manage interpreter bindings
Once you have added code to your notebook, you're ready to execute it and analyze the data. However, you can customize the interpreters used to execute paragraphs by the target server.
On the notebook editor toolbar, click .
In the Interpreter Bindings dialog, use the arrow buttons to alter the priority of an interpreter.
You can also deselect an interpreter and explicitly disable it or restart any interpreter when, for example, the corresponding session got expired.