mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-3034. Only apply dynamic form for LivySqlnterpreter
This commit is contained in:
parent
afd2bca46c
commit
39eff3757d
3 changed files with 12 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ public abstract class BaseLivyInterpreter extends Interpreter {
|
|||
|
||||
@Override
|
||||
public FormType getFormType() {
|
||||
return FormType.SIMPLE;
|
||||
return FormType.NATIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue