Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Zeppelin - Set default interpreter

In Zeppelin, at each row I am having to provide the interpreter at each row. Is there a way to set the interpreter for the whole session.

%pyspark 

import re

Took 0 seconds.


import pandas as pd

console :1: error: '.' expected but identifier found. import pandas as pd


%pyspark

import pandas as pd

Took 0 seconds.


How do I set the interpreter for the whole session?

like image 919
GreenThumb Avatar asked Nov 20 '15 19:11

GreenThumb


1 Answers

The Spark Interpreter group currently has 4 interpreter as listed here...

https://zeppelin.incubator.apache.org/docs/0.5.0-incubating/interpreter/spark.html

The default interpreter is %spark and default interpreter is selected based on the order of the interpreter listed in the zeppelin.interpreters property in zeppelin-site.xml config file.

The current order of interpreter in your zeppelin-site.xml (zeppelin.interpreters property) will be this ...

org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter

Modify this to ...

org.apache.zeppelin.spark.PySparkInterpreter, org.apache.zeppelin.spark.SparkInterpreter

and restart Zeppelin (zeppelin-daemon.sh restart)

This will make %pyspark as default interpreter.

Thanks

like image 80
Sachin Parmar Avatar answered Sep 22 '22 07:09

Sachin Parmar