An Apache Zeppelin interpreter is a plugin that enables you to access processing engines and data sources from the Zeppelin UI.
Zeplin CLI Angular Plugin uses a fork of Compodoc to analyze and collect information from Angular components. Apache zeppelin入门 介绍. Apache Zeppelin是一款基于Web的NoteBook,支持交互式数据分析。使用Zeppelin,可以使用丰富的预构建语言后端(或解释器)制作精美的数据驱动,交互式和协作文档,例如Scala(使用Apache Spark),Python(使用Apache Spark),SparkSQL,Hive ,Markdown,Angular和Shell。.
- Later, you can fully utilize Angular or D3 in Zeppelin for better or more sophisticated visualization. Let's get 'Bank' data from the official Zeppelin tutorial. Next, define a case class for easy transformation into DataFrame and map the text data we downloaded into DataFrame without its header.
- Basic Usage In addition to the backend Angular API to handle Angular objects binding, Apache Zeppelin also exposes a simple AngularJS z object on the front-end side to expose the same capabilities. This z object is accessible in the Angular isolated scope for each paragraph. Bind / Unbind Variables.
For example, if you want to use Python code in your Zeppelin notebook, you need a Python interpreter. Each interpreter runs in its own JVM on the same node as the Zeppelin server. The Zeppelin server communicates with interpreters through the use of Thrift.
Apache Zeppelin on Cloudera Data Platform supports the following interpreters:
JDBC (supports Hive, Phoenix)
OS Shell
Markdown
Livy (supports Spark, Spark SQL, PySpark, PySpark3, and SparkR)
AngularJS
Note: PySpark and associated libraries require Python version 2.7 or later, or Python version 3.4 or later, installed on all nodes.
Basic Usage
In addition to the backend Angular API to handle Angular objects binding, Apache Zeppelin also exposes a simple AngularJS z
object on the front-end side to expose the same capabilities.This z
object is accessible in the Angular isolated scope for each paragraph.
Bind / Unbind Variables
Through the z
, you can bind / unbind variables to AngularJS view.Bind a value to an angular object and a mandatory target paragraph:
Unbind/remove a value from angular object and a mandatory target paragraph:
The signature for the z.angularBind() / z.angularUnbind()
functions are:
All the parameters are mandatory.
Run Paragraph
You can also trigger paragraph execution by calling z.runParagraph()
function passing the appropriate paragraphId:
Zeppelin Angular Download
Zeppelin Angular Core
Overriding dynamic form with Angular Object
The front-end Angular Interaction API has been designed to offer richer form capabilities and variable binding. With the existing Dynamic Form system you can already create input text, select and checkbox forms but the choice is rather limited and the look & feel cannot be changed.
The idea is to create a custom form using plain HTML/AngularJS code and bind actions on this form to push/remove Angular variables to targeted paragraphs using this new API.
Consequently if you use the Dynamic Form syntax in a paragraph and there is a bound Angular object having the same name as the ${formName}
, the Angular object will have higher priority and the Dynamic Form will not be displayed. Example:
Feature matrix comparison
Zeppelin Angular
How does the front-end AngularJS API compares to the backend Angular API? Below is a comparison matrix for both APIs:
Actions | Front-end API | Back-end API |
---|---|---|
Initiate binding | z.angularbind(var, initialValue, paragraphId) | z.angularBind(var, initialValue) |
Update value | same to ordinary angularjs scope variable, or z.angularbind(var, newValue, paragraphId) | z.angularBind(var, newValue) |
Watching value | same to ordinary angularjs scope variable | z.angularWatch(var, (oldVal, newVal) => ..) |
Destroy binding | z.angularUnbind(var, paragraphId) | z.angularUnbind(var) |
Executing Paragraph | z.runParagraph(paragraphId) | z.run(paragraphId) |
Executing Paragraph (Specific paragraphs in other notes) ( | z.run(noteid, paragraphId) | |
Executing note | z.runNote(noteId) |
Both APIs are pretty similar, except for value watching where it is done naturally by AngularJS internals on the front-end and by user custom watcher functions in the back-end. Metrologic driver download.
There is also a slight difference in term of scope. Front-end API limits the Angular object binding to a paragraph scope whereas back-end API allows you to bind an Angular object at the global or note scope. This restriction has been designed purposely to avoid Angular object leaks and scope pollution.