HCP Work With Notes
HCP Work With Notes
https://docs.hortonworks.com
Contents
Zeppelin ships with several sample notes, including tutorials that demonstrate how to run Spark scala code, Spark
SQL code, and create visualizations.
To run a tutorial:
1. Navigate to the tutorial: click one of the Zeppelin tutorial links on the left side of the welcome page, or use the
Notebook pull-down menu.
2. Zeppelin presents the tutorial, a sequence of paragraphs prepopulated with code and text.
3. Starting with the first paragraph, click the triangle button at the upper right of the paragraph. The status changes to
PENDING, RUNNING, and then FINISHED when done.
4. When the first cell finishes execution, results appear in the box underneath your code. Review the results.
5. Step through each cell, running the code and reviewing results.
3
HCP Zeppelin Guide Working with Zeppelin Notes
1. Click "Create new note" on the welcome page, or click the "Notebook" menu and choose "+ Create new note."
2. Type your commands into the blank paragraph in the new note.
When you create a note, it appears in the list of notes on the left side of the home page and in the Notebook menu. By
default, Zeppelin stores notes in the $ZEPPELIN_HOME/notebook folder.
To run your code:
1. Click the triangle button in the cell that contains your code:
2. Zeppelin displays status near the triangle button: PENDING, RUNNING, ERROR, or FINISHED.
3. When finished, results appear in the result section below your code.
The settings icon (outlined in red) offers several additional commands:
These commands allow you to perform several note operations, such as showing and hiding line numbers, clearing the
results section, and deleting the paragraph.
4
HCP Zeppelin Guide Working with Zeppelin Notes
Import a Note
Use the following steps to import an Apache Zeppelin note.
Procedure
1. Click "Import note" on the Zeppelin home page:
3. To upload the file or specify the URL, click the associated box.
By default, the name of the imported note is the same as the original note. You can rename it by providing a new
name in the "Import AS" field.
Export a Note
Use the following steps to export an Apache Zeppelin note.
To export a note to a local JSON file, use the export note icon in the note toolbar:
5
HCP Zeppelin Guide Working with Zeppelin Notes
6
HCP Zeppelin Guide Working with Zeppelin Notes
• Default: the notebook can be shared with (and edited by) anyone who has access to the notebook.
• Simple: similar to default, with available options shown only when your cursor is over the cell.
• Report: only your results are visible, and are read-only (no editing).
Note: Zeppelin on HDP does not support sharing a note by sharing its URL, due to lack of proper access control
over who and how a note can be shared.