[ZEPPELIN-1999] docs

This commit is contained in:
Tinkoff DWH 2017-03-13 00:58:46 +05:00
parent a10dc0ea67
commit 61ac564199

View file

@ -42,13 +42,44 @@ Zeppelin interpreter setting is the configuration of a given interpreter on Zepp
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_setting.png" width="500px">
Properties are exported as environment variable when property name is consisted of upper characters, numbers and underscore ([A-Z_0-9]). Otherwise set properties as JVM property.
You may use parameters from the context of interpreter by add #{contextParameterName} (except fields of paragraph) in value, parameter can be of the following types: string, number, boolean. The list of available context parameters can be viewed in the class [InterpreterContext.java](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterContext.java) + parameter #{user}.
You may use parameters from the context of interpreter by add #{contextParameterName} (except fields of paragraph) in value, parameter can be of the following types: string, number, boolean.
###### Context parameters
<table class="table-configuration">
<tr>
<th>Name</th>
<th>Type</th>
</tr>
<tr>
<td>user</td>
<td>string</td>
</tr>
<tr>
<td>noteId</td>
<td>string</td>
</tr>
<tr>
<td>replName</td>
<td>string</td>
</tr>
<tr>
<td>className</td>
<td>string</td>
</tr>
</table>
If context parameter is null then replaced by empty string.
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_setting_with_context_parameters.png" width="500px">
###### Usage
For example in database exist user `user1` with some password and exists user with same name into Zeppelin. Configure the jdbc interpreter (postgres), set `default.user = #{user}`.
1. Sign in (as `user1`)
2. Open interpreter
3. Execute `select current_user`
<br>
Each notebook can be bound to multiple Interpreter Settings using setting icon on upper right corner of the notebook.
<img src="../assets/themes/zeppelin/img/screenshots/interpreter_binding.png" width="800px">