Using Input Forms with Shell Scripts – Apache Zeppelin

Apache Zeppelin is a fantastic open source web-based software that allows users to build and share great looking data visualizations using various languages. If you aren’t familiar with using the shell interpreter in Apache Zeppelin, see our related post Creating Graphs with the Zeppelin Shell Interpreter.

Apache Zeppelin allows dynamic creation of text input forms in your notebooks. Input forms can be created and referenced using a simple template language. For example, using ${variable_name} in a shell script will reference the value in the associated input form (in this case the “variable_name” input form). If this text input form does not already exist, Zeppelin will add it to your notebook. To set a default value for a text input form, use the ${variable_name=value} syntax.

Using a Text Input Form in Shell Scripts

Here is an example running a shell script on NBA data that references the value in the “Team Name” input form. Notice that the default value for this form is “Jazz” but we have since changed this value to “Bulls”.

Apache Zeppelin Shell Script with Input Form

Using Multiple Text Input Forms in Shell Scripts

Zeppelin allows the dynamic creation of many input forms in each notebook. Here is an example of running a shell script that references the values of multiple input forms (“Team Name” and “Start Year”):

Apache Zeppelin Shell Script with Input Form

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">