Dynamic Forms

Teragrep and Apache Zeppelin allow creating dynamically input forms in notebooks. These forms can have a paragraph or a notebook scope.

Table 1. Interpreters that support dynamic forms
Interpreter name Paragraph scope Notebook scope

Angular

DPL

supported

supported

Java

supported

supported

Markdown

supported

PySpark

supported

supported

Python

Scala

supported

supported

Shell

supported

supported

Spark SQL

supported

supported

Paragraph Scope

Forms with a paragraph scope are available only in the same paragraph where the form is executed. Paragraph scope forms can be created with Markdown, Shell or Spark SQL, for example.

Notebook Scope

Forms with a notebook scope are available in all paragraphs. These forms can be created either by using markdown form templates or creating forms programmatically.

Interpolated Variable

Use ${variable} to interpolate a variable. It will fail fast if that variable doesn’t exist.

%dpl
index=audit username="${username}"
interpolation

Fallback String

Use ${maybe_exists:-literal fallback string} where variables aren’t required to exist. It will create a fallback to the literal string after :-.

%dpl
index=audit type=${type:-Error} ${content:-}
interpolation

Literal String

Use $${literal} when you want to have literal ${literal}.

%dpl
index=audit $${literal}
interpolation