ZEPPELIN-3034. Only apply dynamic form for LivySqlnterpreter

This commit is contained in:
Jeff Zhang 2017-11-05 19:35:14 +08:00
parent afd2bca46c
commit 39eff3757d
3 changed files with 12 additions and 6 deletions

View file

@ -208,12 +208,13 @@ i.e. sends extra parameter for creating and running a session ("proxyUser": "${l
This is particularly useful when multi users are sharing a Notebook server.
## Apply Zeppelin Dynamic Forms
You can leverage [Zeppelin Dynamic Form](../usage/dynamic_form/intro.html). You can use both the `text input` and `select form` parameterization features.
You can leverage [Zeppelin Dynamic Form](../usage/dynamic_form/intro.html). Form templates is only avalible for livy sql interpreter.
```
%livy.sql
select * from products where ${product_id=1}
```
```
%livy.pyspark
print "${group_by=product_id,product_id|product_name|customer_id|store_id}"
```
And creating dynamic formst programmatically is not feasible in livy interpreter, because ZeppelinContext is not available in livy interpreter.
## FAQ

View file

@ -212,7 +212,7 @@ public abstract class BaseLivyInterpreter extends Interpreter {
@Override
public FormType getFormType() {
return FormType.SIMPLE;
return FormType.NATIVE;
}
@Override

View file

@ -159,6 +159,11 @@ public class LivySparkSQLInterpreter extends BaseLivyInterpreter {
}
}
@Override
public FormType getFormType() {
return FormType.SIMPLE;
}
protected List<String> parseSQLOutput(String output) {
List<String> rows = new ArrayList<>();
String[] lines = output.split("\n");